Skip to content

Commit

Permalink
small clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeWaka committed Feb 11, 2023
1 parent 135d0c6 commit 65cf48a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fn submit_request(prep: RequestPrep) -> Result<String> {
}

if let Some(output_filename) = prep.output_filename {
let mut writer = std::io::BufWriter::new(std::fs::File::create(&output_filename)?);
let mut writer = std::io::BufWriter::new(std::fs::File::create(output_filename)?);
std::io::copy(&mut response, &mut writer)?;
writer.flush()?;
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ byond_fn!(fn log_write(path, data, ...rest) {
// write first line, timestamped
let mut iter = data.split('\n');
if let Some(line) = iter.next() {
write!(file, "[{}] {}\n", Utc::now().format("%F %T%.3f"), line)?;
writeln!(file, "[{}] {}", Utc::now().format("%F %T%.3f"), line)?;
}

// write remaining lines
for line in iter {
write!(file, " - {}\n", line)?;
writeln!(file, " - {}", line)?;
}
}

Expand Down

0 comments on commit 65cf48a

Please sign in to comment.