From 400a927ce1b8a4a3211b48a9c7ff4d38e1751134 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 12 Dec 2024 09:42:59 +0100 Subject: [PATCH] clippy --- src/timetable.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/timetable.rs b/src/timetable.rs index d56bf92..4655670 100644 --- a/src/timetable.rs +++ b/src/timetable.rs @@ -177,16 +177,16 @@ pub fn build(timetable: &models::Timetable, dates: &Info) -> Vec &schedules, &timetable.1 .1, &datetimes.course, - &Some(vec![models::Category::Cours]), - &None, + Some(&vec![models::Category::Cours]), + None, ); add_courses( &mut semester, &schedules, &timetable.1 .1, &datetimes.td_tp, - &None, - &Some(vec![models::Category::Cours]), + None, + Some(&vec![models::Category::Cours]), ); semester @@ -205,9 +205,9 @@ fn add_courses( // Current courses list info: &InfoList, // List of category allowed - keep: &Option>, + keep: Option<&Vec>, // List of category excluded - exclude: &Option>, + exclude: Option<&Vec>, ) { let before_break = info.first().unwrap(); let mut date = before_break.0; @@ -224,9 +224,8 @@ fn add_courses( // Check keep and exclude filters if keep - .clone() .is_some_and(|list| !course.category.iter().any(|item| list.contains(item))) - || exclude.clone().is_some_and(|list| { + || exclude.is_some_and(|list| { course.category.iter().any(|item| list.contains(item)) }) {