Fix clippy errors

This commit is contained in:
Megan Wright 2022-08-02 10:23:07 +01:00
parent c13380ba69
commit 7f71cdc290

View File

@ -4,6 +4,7 @@
// //
use std::env; use std::env;
use std::fmt::Write as _;
use std::fs; use std::fs;
use std::path::Path; use std::path::Path;
use std::process::{Command, ExitStatus}; use std::process::{Command, ExitStatus};
@ -110,10 +111,11 @@ impl ImageService {
let mut error_message = format!("failed to pull image: {:?}", status); let mut error_message = format!("failed to pull image: {:?}", status);
if let Err(e) = fs::remove_dir_all(&tmp_cid_path) { if let Err(e) = fs::remove_dir_all(&tmp_cid_path) {
error_message.push_str(&format!( let _ = write!(
error_message,
" and clean up of temporary container directory {:?} failed with error {:?}", " and clean up of temporary container directory {:?} failed with error {:?}",
tmp_cid_path, e tmp_cid_path, e
)); );
}; };
return Err(anyhow!(error_message)); return Err(anyhow!(error_message));
} }