Sort by RQ and car name rather than RQ and occurences
This commit is contained in:
parent
4a21a552d7
commit
ad60ab1b11
1 changed files with 2 additions and 2 deletions
|
|
@ -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!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue