Fix: For the best cars the highest RQ of any given track where they were best was printed, instead of the car's RQ. The list was also sorted by that wrong RQ
This commit is contained in:
parent
1a6ea07ed9
commit
5dd278b8f1
1 changed files with 3 additions and 3 deletions
|
|
@ -110,12 +110,12 @@ fn print_best_cars() {
|
||||||
|
|
||||||
// Convert to vector and sort by RQ first, then frequency
|
// Convert to vector and sort by RQ first, then frequency
|
||||||
let mut car_count_vec: Vec<_> = car_count.iter().collect();
|
let mut car_count_vec: Vec<_> = car_count.iter().collect();
|
||||||
car_count_vec.sort_by(|a, b| a.1 .1.cmp(&b.1 .1).then(a.0.cmp(b.0)));
|
car_count_vec.sort_by(|a, b| a.1.2.rq.cmp(&b.1.2.rq).then(a.0.cmp(b.0)));
|
||||||
|
|
||||||
for (_car_rid, (count, rq, car_record)) in car_count_vec {
|
for (_car_rid, (count, _rq, car_record)) in car_count_vec {
|
||||||
println!(
|
println!(
|
||||||
"{},{},{},{},{}",
|
"{},{},{},{},{}",
|
||||||
rq, car_record.brand, car_record.only_name, car_record.year, count
|
car_record.rq, car_record.brand, car_record.only_name, car_record.year, count
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue