patch lab 1 feedback + do lab 02

This commit is contained in:
SowinskiBraeden committed 2026-10-01 18:12:33 -07:00
1 parent 6ab13bfafa
commit b3a3c72949
2 files changed
+107 -2

No files matched your search

+1 -2
View File
@@ -22,9 +22,8 @@ fn main() {
};
let mut records: Vec<(String, String, u8)> = input.lines().filter_map(record).collect();
records.sort();
records.sort_by(|a, b| (a.2, &a.1, &a.0).cmp(&(b.2, &b.1, &b.0)));
records.dedup();
records.sort_by_key(|r| r.2);
for (first_name, last_name, score) in records {
println!("{} {}, {}", score, last_name, first_name);