From bbdc50b23ad4f32aa7184c38ed55fea0facef95a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 3 Jan 2025 10:43:58 +0100 Subject: [PATCH] use if let construction --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index d3b6bd8..f4e6515 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,10 +79,8 @@ async fn main() { println!("Récupération des informations par rapport à l'année..."); let info = info::info(args.semester, args.year, &date, args.week_skip); - if args.export.is_some() { + if let Some(mut filename) = args.export { // Export the calendar - let mut filename = args.export.unwrap(); - let builded_timetable = timetable::build(&timetable, &info); ics::export(builded_timetable, &mut filename, !args.no_tz);