diff options
author | Yigit Sever | 2022-04-23 20:29:36 +0300 |
---|---|---|
committer | Yigit Sever | 2022-04-23 20:29:36 +0300 |
commit | 21095d29f348d8c965df9871bbc0644de5000a53 (patch) | |
tree | c13444763ca514869192022fac8b861bd8663620 /src/student.rs | |
parent | d76de7951d995026feaeb92c278f45e810acd3de (diff) | |
download | gradecoin-21095d29f348d8c965df9871bbc0644de5000a53.tar.gz gradecoin-21095d29f348d8c965df9871bbc0644de5000a53.tar.bz2 gradecoin-21095d29f348d8c965df9871bbc0644de5000a53.zip |
Format, refactor, succinct errors
Diffstat (limited to 'src/student.rs')
-rw-r--r-- | src/student.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/student.rs b/src/student.rs index b6d99cd..5af512e 100644 --- a/src/student.rs +++ b/src/student.rs | |||
@@ -26,7 +26,13 @@ pub struct User { | |||
26 | 26 | ||
27 | impl fmt::Display for User { | 27 | impl fmt::Display for User { |
28 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | 28 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
29 | write!(f, "{}", self.user_id) | 29 | write!(f, "{}", self.user_id.get_id()) |
30 | } | ||
31 | } | ||
32 | |||
33 | impl fmt::Display for UserAtRest { | ||
34 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
35 | write!(f, "{}", self.user) | ||
30 | } | 36 | } |
31 | } | 37 | } |
32 | 38 | ||