diff --git a/src/records.rs b/src/records.rs index a8e1f6b..5f1ed90 100644 --- a/src/records.rs +++ b/src/records.rs @@ -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!(