From 21095d29f348d8c965df9871bbc0644de5000a53 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 23 Apr 2022 20:29:36 +0300 Subject: Format, refactor, succinct errors --- src/student.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/student.rs') 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 { impl fmt::Display for User { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.user_id) + write!(f, "{}", self.user_id.get_id()) + } +} + +impl fmt::Display for UserAtRest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.user) } } -- cgit v1.2.3-70-g09d2