From b621436483bd9ec95b5104e57f36f56039e5666d Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Sep 2024 19:23:00 +0200 Subject: [PATCH] format --- src/timetable.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/timetable.rs b/src/timetable.rs index 58f4168..fe0fba0 100644 --- a/src/timetable.rs +++ b/src/timetable.rs @@ -71,9 +71,9 @@ pub async fn timetable( .capitalize(); let startime = matches - .name("startime") - .unwrap() - .as_str(); + .name("startime") + .unwrap() + .as_str(); let binding = i.select(&sel_b).last().unwrap().inner_html(); let course = models::Course{ @@ -91,21 +91,21 @@ pub async fn timetable( }, }, name: matches - .name("name") - .unwrap() - .as_str().to_owned(), + .name("name") + .unwrap() + .as_str().to_owned(), professor: if let Some(raw_prof) = i.select(&sel_small).last() { - match raw_prof.inner_html() { - i if i.starts_with(" None, - i => Some(i), - } - } else { None }, + match raw_prof.inner_html() { + i if i.starts_with(" None, + i => Some(i), + } + } else { None }, room: Regex::new(r"(|
.*?
.*?)?
(?P.*?)
") - .unwrap() - .captures(&binding) - .unwrap().name("location") - .unwrap() - .as_str().to_owned(), + .unwrap() + .captures(&binding) + .unwrap().name("location") + .unwrap() + .as_str().to_owned(), start: schedules.iter().position(|r| r.starts_with(startime)).unwrap(), size: i.value().attr("rowspan").unwrap().parse::().unwrap(), dtstart: None,