diff --git a/src/main.rs b/src/main.rs index dc76b42..2987064 100644 --- a/src/main.rs +++ b/src/main.rs @@ -152,7 +152,7 @@ fn parse_file(file: impl io::Read) -> Result Result { - fn split_to<'a>(&'a self, num: usize) -> Vec<&'a [T]>; + fn split_to(&self, num: usize) -> Vec<&[T]>; } impl SplitTo for Vec { - fn split_to<'a>(&'a self, num: usize) -> Vec<&'a [T]> { + fn split_to(&self, num: usize) -> Vec<&[T]> { let part_len = self.len() / num; let add_len = self.len() % num; - let mut result = Vec::<&'a [T]>::with_capacity(num); + let mut result = Vec::<&[T]>::with_capacity(num); if 0 == part_len { result.push(self); @@ -246,7 +246,7 @@ impl SplitTo for Vec { fn process_files(files: &&[PathBuf]) { - if files.len() < 1 { + if files.is_empty() { return; }