1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

stat: fix cargo clippy complaint (unnecessary_sort_by) (#1594)

This commit is contained in:
Roy Ivy III 2020-09-04 01:01:53 -05:00 committed by GitHub
parent 4b76849de7
commit 2ff6b67077
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -485,7 +485,8 @@ impl Stater {
.filter_map(|line| line.split_whitespace().nth(1).map(ToOwned::to_owned))
.collect::<Vec<String>>();
// Reverse sort. The longer comes first.
mount_list.sort_by(|a, b| b.cmp(a));
mount_list.sort();
mount_list.reverse();
Some(mount_list)
};