From 433a9a52d3701b0ca699cce5244368e25eef3081 Mon Sep 17 00:00:00 2001 From: Victor Song Date: Fri, 30 Sep 2022 23:26:44 -0400 Subject: [PATCH] Use mutable slice instead of creating new Vec in filters --- src/fs/filter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs/filter.rs b/src/fs/filter.rs index d3f831b..84f607c 100644 --- a/src/fs/filter.rs +++ b/src/fs/filter.rs @@ -89,7 +89,7 @@ impl FileFilter { } /// Sort the files in the given vector based on the sort field option. - pub fn sort_files<'a, F>(&self, files: &mut Vec) + pub fn sort_files<'a, F>(&self, files: &mut [F]) where F: AsRef> { files.sort_by(|a, b| {