From 220f46c5de783298e6d15fad965b7ce7c9623b9e Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 1 Jan 2024 11:21:59 +0100 Subject: [PATCH] clippy --- src/filter.rs | 2 +- src/timetable.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filter.rs b/src/filter.rs index 3fc4f0b..5568b9b 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -101,7 +101,7 @@ fn tdtp(timetable: &mut Timetable) { // Keep only elements who have multiples TD/TP td_or_tp.retain(|course| *counts.get(&get_entry(course.0)).unwrap() > 1); - let mut multiselected: Vec = td_or_tp.iter().map(|el| get_selection(el)).collect(); + let mut multiselected: Vec = td_or_tp.iter().map(get_selection).collect(); multiselected.sort(); let defaults = vec![false; multiselected.len()]; diff --git a/src/timetable.rs b/src/timetable.rs index 0a022b1..bf992ed 100644 --- a/src/timetable.rs +++ b/src/timetable.rs @@ -154,7 +154,7 @@ pub fn build(timetable: models::Timetable, dates: D) -> Vec { // Start date of the back-to-school week let datetimes = dates.get(&timetable.1 .0).unwrap(); - let before_break = datetimes.get(0).unwrap(); + let before_break = datetimes.first().unwrap(); let mut date = before_break.0; let mut rep = before_break.1; // For each weeks