Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hansieodendaal committed Dec 9, 2024
1 parent 32ba3d9 commit 2b01340
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ enum PingResult {
Fail,
}

#[allow(clippy::too_many_lines)]
#[async_trait]
impl HandleCommand<ArgsTestPeerLiveness> for CommandContext {
async fn handle_command(&mut self, args: ArgsTestPeerLiveness) -> Result<(), Error> {
Expand Down Expand Up @@ -168,7 +169,7 @@ impl HandleCommand<ArgsTestPeerLiveness> for CommandContext {
};

if let Some(true) = args.refresh_file {
let _ = fs::remove_file(&file_path);
let _unused = fs::remove_file(&file_path);
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
}
let write_header = !file_path.exists();
Expand All @@ -178,7 +179,7 @@ impl HandleCommand<ArgsTestPeerLiveness> for CommandContext {
file_content.push_str("Public Key,Date Time,Result\n");
}
file_content.push_str(
&format!("{},{},{},{:.2?}\n",date_time, public_key_clone, test_result, test_time)
&format!("{},{},{},{:.2?}",date_time, public_key_clone, test_result, test_time)
);
match writeln!(file, "{}", file_content) {
Ok(_) => {
Expand Down

0 comments on commit 2b01340

Please sign in to comment.