much nicer output
This commit is contained in:
parent
5f36f663fc
commit
b92ceabfe2
1 changed files with 8 additions and 2 deletions
10
src/main.rs
10
src/main.rs
|
@ -101,7 +101,7 @@ fn main() {
|
||||||
.filter(|e| !e.file_type().is_dir()) // remove directories from the final list
|
.filter(|e| !e.file_type().is_dir()) // remove directories from the final list
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
info!("Found {} items to check", entries.len());
|
trace!("Found {} items to check", entries.len());
|
||||||
|
|
||||||
let results: Vec<Result<Findings, PathBuf>> = entries
|
let results: Vec<Result<Findings, PathBuf>> = entries
|
||||||
.par_iter()
|
.par_iter()
|
||||||
|
@ -148,7 +148,13 @@ fn main() {
|
||||||
|
|
||||||
for result in results {
|
for result in results {
|
||||||
match result {
|
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)
|
Err(f) => warn!("{:#?}: Error 0uo", f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue