Sort by RQ and car name rather than RQ and occurences

This commit is contained in:
Jan-Peter von Hunnius 2025-04-25 09:17:54 +02:00
parent 4a21a552d7
commit ad60ab1b11

View file

@ -108,9 +108,9 @@ fn print_best_cars() {
entry.1 += 1;
}
// Convert to vector and sort by RQ first, then frequency
// Convert to vector and sort by RQ first, then name
let mut car_count_vec: Vec<_> = car_count.iter().collect();
car_count_vec.sort_by(|a, b| a.1.0.rq.cmp(&b.1.0.rq).then(a.1.1.cmp(&b.1.1)));
car_count_vec.sort_by(|a, b| a.1.0.rq.cmp(&b.1.0.rq).then(a.0.cmp(&b.0)));
for (_car_rid, (car_record, count)) in car_count_vec {
println!(