aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO4
-rw-r--r--src/uid.rs6
2 files changed, 6 insertions, 4 deletions
diff --git a/TODO b/TODO
index af593f0..e28adb8 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,6 @@
Need to make a proper http status code thingy
Token Values
Token Stock Prices (Values)
-Config \ No newline at end of file
+Config
+Change passwords
+Trade Requests \ No newline at end of file
diff --git a/src/uid.rs b/src/uid.rs
index 6361638..ad18b7e 100644
--- a/src/uid.rs
+++ b/src/uid.rs
@@ -20,13 +20,13 @@ impl<'de> Visitor<'de> for UIDVisitor {
if v.len() == 4 {
match hex::decode(v) {
Ok(n) => Ok(UID(n[0], n[1])),
- Err(_) => panic!()
+ Err(_) => Err(serde::de::Error::custom("Could not decode hex"))
}
} else {
- panic!()
+ Err(serde::de::Error::custom("ID must be a 2 byte hex string \'0000\'-\"FFFF\""))
}
} else {
- panic!()
+ Err(serde::de::Error::custom("Invalid characters in string"))
}
}
}