From fb039f33a4a16fd62abe28ab4d9afb92f5ac1eb3 Mon Sep 17 00:00:00 2001 From: MedzikUser Date: Sun, 23 Jan 2022 14:33:24 +0100 Subject: [PATCH] fix `cargo clippy` --- src/cli/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/mod.rs b/src/cli/mod.rs index f165d7d..a41a25d 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -19,19 +19,19 @@ pub fn print_image_info(i: ImageInfo) { if i.data.title != None { info!( "Title {}", - i.data.title.unwrap_or("unknown".to_string()) + i.data.title.unwrap_or_else(|| "unknown".to_string()) ); } if i.data.description != None { info!( "Description {}", - i.data.description.unwrap_or("unknown".to_string()) + i.data.description.unwrap_or_else(|| "unknown".to_string()) ); } if i.data.deletehash != None { info!( "Deletehash {}", - i.data.deletehash.unwrap_or("unknown".to_string()) + i.data.deletehash.unwrap_or_else(|| "unknown".to_string()) ); }