From 5eba7cdc30c786245f19db34f6893935e422c2b1 Mon Sep 17 00:00:00 2001 From: beeb Date: Sun, 8 Jan 2023 13:21:47 +0100 Subject: [PATCH] fix: still print items even if file size or modified time cannot be retrieved --- src/output.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/output.rs b/src/output.rs index 0c80516..fc96ce1 100644 --- a/src/output.rs +++ b/src/output.rs @@ -60,21 +60,12 @@ pub fn print(duplicates: Vec, opts: &Params) { dup_index.into_iter().for_each(|(_, group)| { group.into_iter().for_each(|file| { - let Ok(path) = format_path(&file.path, opts) else { - return; - }; - let Ok(file_size) = file_size(&file.path) else { - return; - }; - let Ok(modified_time) = modified_time(&file.path) else { - return; - }; println!( "| {0: <16} | {1: <35} | {2: <16} | {3: <32} |", file.hash.red(), - path.yellow(), - file_size.blue(), - modified_time.blue() + format_path(&file.path, opts).unwrap_or_default().yellow(), + file_size(&file.path).unwrap_or_default().blue(), + modified_time(&file.path).unwrap_or_default().blue() ); }); print_divider();