From ecf9363339b04e8721d269ccb811907fa5f4f8fc Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 31 Jul 2024 17:31:03 -0400 Subject: [PATCH] Fix two minor clippy lints Signed-off-by: Colin Walters --- lib/src/image.rs | 2 +- lib/src/imgstorage.rs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/src/image.rs b/lib/src/image.rs index bdda5e707..5fd84b4f3 100644 --- a/lib/src/image.rs +++ b/lib/src/image.rs @@ -22,7 +22,7 @@ pub(crate) async fn list_entrypoint() -> Result<()> { for image in images { println!("{image}"); } - println!(""); + println!(); println!("# Logically bound images"); let mut listcmd = sysroot.imgstore.new_image_cmd()?; diff --git a/lib/src/imgstorage.rs b/lib/src/imgstorage.rs index e3b0cf336..705a8a996 100644 --- a/lib/src/imgstorage.rs +++ b/lib/src/imgstorage.rs @@ -126,10 +126,9 @@ impl Storage { } fn init_globals() -> Result<()> { - // Ensure our global storage alias dirs exist - for d in [STORAGE_ALIAS_DIR] { - std::fs::create_dir_all(d).with_context(|| format!("Creating {d}"))?; - } + // Ensure our global storage alias dir exists + std::fs::create_dir_all(STORAGE_ALIAS_DIR) + .with_context(|| format!("Creating {STORAGE_ALIAS_DIR}"))?; Ok(()) }