Skip to content

Commit 65cf48a

Browse files
committed
small clippy fixes
1 parent 135d0c6 commit 65cf48a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fn submit_request(prep: RequestPrep) -> Result<String> {
148148
}
149149

150150
if let Some(output_filename) = prep.output_filename {
151-
let mut writer = std::io::BufWriter::new(std::fs::File::create(&output_filename)?);
151+
let mut writer = std::io::BufWriter::new(std::fs::File::create(output_filename)?);
152152
std::io::copy(&mut response, &mut writer)?;
153153
writer.flush()?;
154154
} else {

src/log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ byond_fn!(fn log_write(path, data, ...rest) {
3131
// write first line, timestamped
3232
let mut iter = data.split('\n');
3333
if let Some(line) = iter.next() {
34-
write!(file, "[{}] {}\n", Utc::now().format("%F %T%.3f"), line)?;
34+
writeln!(file, "[{}] {}", Utc::now().format("%F %T%.3f"), line)?;
3535
}
3636

3737
// write remaining lines
3838
for line in iter {
39-
write!(file, " - {}\n", line)?;
39+
writeln!(file, " - {}", line)?;
4040
}
4141
}
4242

0 commit comments

Comments
 (0)