Skip to content

Commit

Permalink
Use unstable sort
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkKronicle committed Jan 14, 2024
1 parent 8ba855e commit 18dadef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/freedesktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ struct MountPoint {
fn get_sorted_mount_points() -> Result<Vec<MountPoint>, Error> {
// Returns longest mount points first
let mut mount_points = get_mount_points()?;
mount_points.sort_by(|a, b| b.mnt_dir.as_os_str().as_bytes().len().cmp(&a.mnt_dir.as_os_str().as_bytes().len()));
mount_points.sort_unstable_by(|a, b| b.mnt_dir.as_os_str().as_bytes().len().cmp(&a.mnt_dir.as_os_str().as_bytes().len()));
Ok(mount_points)
}

Expand Down

0 comments on commit 18dadef

Please sign in to comment.