From 80382751dfb9e028b762acbbd4804592ddd6850f Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 25 Aug 2022 15:49:12 +0300 Subject: [PATCH] clippy fixes --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; }