From f12685e32689b620d6096ec91ba3a3f495342925 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 15 Apr 2022 19:01:40 +0300 Subject: [WIP] first part of lazy users overhaul --- src/student.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/student.rs') diff --git a/src/student.rs b/src/student.rs index 4b7acf1..711eeeb 100644 --- a/src/student.rs +++ b/src/student.rs @@ -26,6 +26,7 @@ pub struct User { } /// The values are hard coded in [`static@OUR_STUDENTS`] so `MetuId::new`() can accept/reject values based on that +/// TODO update the statement above #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] pub struct MetuId { id: String, @@ -46,10 +47,14 @@ impl MetuId { None } } + + // TODO: replace the function above with this <15-04-22, yigit> // + pub fn _new(id: String, passwd: String) -> Self { + MetuId { id, passwd } + } } // TODO: remove this, read from a yaml or something, then MetuId::new gets a self <11-04-22, yigit> // - // Students who are authorized to have Gradecoin accounts lazy_static! { static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { -- cgit v1.2.3-70-g09d2