mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 03:55:11 +00:00
Use mutable slice instead of creating new Vec in filters
This commit is contained in:
parent
7c1878f0e4
commit
433a9a52d3
@ -89,7 +89,7 @@ impl FileFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Sort the files in the given vector based on the sort field option.
|
/// Sort the files in the given vector based on the sort field option.
|
||||||
pub fn sort_files<'a, F>(&self, files: &mut Vec<F>)
|
pub fn sort_files<'a, F>(&self, files: &mut [F])
|
||||||
where F: AsRef<File<'a>>
|
where F: AsRef<File<'a>>
|
||||||
{
|
{
|
||||||
files.sort_by(|a, b| {
|
files.sort_by(|a, b| {
|
||||||
|
Loading…
Reference in New Issue
Block a user