From b92ceabfe2a899aa391a3b2d9b3d8f9fa64d0c6a Mon Sep 17 00:00:00 2001 From: Lynnesbian Date: Fri, 5 Feb 2021 23:49:36 +1000 Subject: [PATCH] much nicer output --- src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3c3b41f..eb9859d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,7 +101,7 @@ fn main() { .filter(|e| !e.file_type().is_dir()) // remove directories from the final list .collect(); - info!("Found {} items to check", entries.len()); + trace!("Found {} items to check", entries.len()); let results: Vec> = entries .par_iter() @@ -148,7 +148,13 @@ fn main() { for result in results { match result { - Ok(r) => trace!("{:#?}: {:#?} - {:?} - {:?}", r.file, r.mime, r.valid, r.recommended_extension()), + Ok(r) => { + if !r.valid { + info!("{:?} should have file extension {}", r.file, r.recommended_extension().unwrap()) + } else { + trace!("{:?} is totally fine", r.file) + } + } Err(f) => warn!("{:#?}: Error 0uo", f) } }