diff options
Diffstat (limited to 'src/student.rs')
-rw-r--r-- | src/student.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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 { | |||
26 | } | 26 | } |
27 | 27 | ||
28 | /// The values are hard coded in [`static@OUR_STUDENTS`] so `MetuId::new`() can accept/reject values based on that | 28 | /// The values are hard coded in [`static@OUR_STUDENTS`] so `MetuId::new`() can accept/reject values based on that |
29 | /// TODO update the statement above | ||
29 | #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] | 30 | #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] |
30 | pub struct MetuId { | 31 | pub struct MetuId { |
31 | id: String, | 32 | id: String, |
@@ -46,10 +47,14 @@ impl MetuId { | |||
46 | None | 47 | None |
47 | } | 48 | } |
48 | } | 49 | } |
50 | |||
51 | // TODO: replace the function above with this <15-04-22, yigit> // | ||
52 | pub fn _new(id: String, passwd: String) -> Self { | ||
53 | MetuId { id, passwd } | ||
54 | } | ||
49 | } | 55 | } |
50 | 56 | ||
51 | // TODO: remove this, read from a yaml or something, then MetuId::new gets a self <11-04-22, yigit> // | 57 | // TODO: remove this, read from a yaml or something, then MetuId::new gets a self <11-04-22, yigit> // |
52 | |||
53 | // Students who are authorized to have Gradecoin accounts | 58 | // Students who are authorized to have Gradecoin accounts |
54 | lazy_static! { | 59 | lazy_static! { |
55 | static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { | 60 | static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { |