Skip to content

Commit

Permalink
Use sort_by_key
Browse files Browse the repository at this point in the history
  • Loading branch information
vv9k committed Jun 22, 2021
1 parent 25ec013 commit 96e8561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub fn file_picker(root: PathBuf) -> Picker<PathBuf> {
files.take(MAX).collect()
};

files.sort_by(|(_, time1), (_, time2)| time1.cmp(time2));
files.sort_by_key(|file| file.1);

let files = files.into_iter().map(|(path, _)| path).collect();

Expand Down

0 comments on commit 96e8561

Please sign in to comment.