use if let construction

This commit is contained in:
Mylloon 2025-01-03 10:43:58 +01:00
parent 4015b3777f
commit bbdc50b23a
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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);