From 10d9904fd70de52da265c1cfd6ac615fd8e4bbd5 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 15 Aug 2022 20:09:41 +0200 Subject: [PATCH] return semester --- src/timetable.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/timetable.rs b/src/timetable.rs index 2f346a4..ea81a47 100644 --- a/src/timetable.rs +++ b/src/timetable.rs @@ -1,9 +1,15 @@ +use std::collections::HashMap; + use scraper::{Html, Selector}; pub mod models; /// Fetch the timetable for a class -pub async fn timetable(year: i8, semester: i8, letter: Option) -> Vec { +pub async fn timetable( + year: i8, + semester: i8, + letter: Option, +) -> HashMap> { let document = get_webpage(year, semester, letter) .await .expect("Can't reach timetable website."); @@ -94,7 +100,7 @@ pub async fn timetable(year: i8, semester: i8, letter: Option) -> Vec