From 660a9bf7ad39569a070fc3a86ea60bf3a5f3aaa8 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 8 Feb 2020 21:08:43 +1000 Subject: [PATCH] tidying --- rslib/src/media/check.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/rslib/src/media/check.rs b/rslib/src/media/check.rs index 750361a2a..e4fa6d671 100644 --- a/rslib/src/media/check.rs +++ b/rslib/src/media/check.rs @@ -13,7 +13,7 @@ use std::borrow::Cow; #[derive(Debug, PartialEq)] pub struct MediaCheckOutput { - all_files: Vec, + files: Vec, renamed: Vec, dirs: Vec, oversize: Vec, @@ -51,11 +51,6 @@ where } pub fn check(&mut self) -> Result { - // rename any invalid files, by copying+trashing original - // note the rename in the list - // record current name regardless of rename - // note dirs/oversized files - // loop through on-disk files let mut dirs = vec![]; let mut oversize = vec![]; @@ -106,7 +101,7 @@ where } Ok(MediaCheckOutput { - all_files, + files: all_files, renamed: renamed_files, dirs, oversize, @@ -194,7 +189,7 @@ mod test { assert_eq!( output, MediaCheckOutput { - all_files: vec!["con_.jpg".to_string(), "normal.jpg".to_string()], + files: vec!["con_.jpg".to_string(), "normal.jpg".to_string()], renamed: vec![RenamedFile { current_fname: "con_.jpg".to_string(), original_fname: "con.jpg".to_string() @@ -226,7 +221,7 @@ mod test { assert_eq!( output, MediaCheckOutput { - all_files: vec!["ぱぱ.jpg".to_string()], + files: vec!["ぱぱ.jpg".to_string()], renamed: vec![], dirs: vec![], oversize: vec![] @@ -238,7 +233,7 @@ mod test { assert_eq!( output, MediaCheckOutput { - all_files: vec!["ぱぱ.jpg".to_string()], + files: vec!["ぱぱ.jpg".to_string()], renamed: vec![RenamedFile { current_fname: "ぱぱ.jpg".to_string(), original_fname: "ぱぱ.jpg".to_string()