feat: sort interactive results by descending size

This commit is contained in:
Valentin Bersier
2023-01-18 15:33:23 +01:00
parent 72ca7c7a44
commit dfb73ceb5c

View File

@@ -128,6 +128,9 @@ pub fn interactive(duplicates: DashMap<String, Vec<File>>, opts: &Params) {
duplicates
.clone()
.into_iter()
.sorted_unstable_by_key(|f| {
-(f.1.first().and_then(|ff| ff.size).unwrap_or_default() as i64)
})
.enumerate()
.for_each(|(gindex, (_, group))| {
let mut itable = Table::new();