aboutsummaryrefslogtreecommitdiffstats
path: root/src/student.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/student.rs')
-rw-r--r--src/student.rs7
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)]
30pub struct MetuId { 31pub 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
54lazy_static! { 59lazy_static! {
55 static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { 60 static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = {