From 935ab42e619e64755f0258644343474e74e08960 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 15 Aug 2022 20:09:16 +0200 Subject: [PATCH] use real semester int --- src/info.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/info.rs b/src/info.rs index 69eb420..f873848 100644 --- a/src/info.rs +++ b/src/info.rs @@ -35,7 +35,7 @@ pub async fn info() -> HashMap, DateTime)>> { // -1 car la première semaine est déjà compté let end_date = start_date + Duration::weeks(rep - 1); - data.insert(i, vec![(start_date, end_date)]); + data.insert(i + 1, vec![(start_date, end_date)]); } e if e.starts_with("Reprise") => { let captures = re.captures(&e).unwrap(); @@ -50,7 +50,7 @@ pub async fn info() -> HashMap, DateTime)>> { let mut vec = data.get(&i).unwrap().to_owned(); vec.push((start_date, end_date)); - data.insert(i, vec); + data.insert(i + 1, vec); } _ => (), }