From f14a05644a5cfcd7e0fd01e3fedb055b1fbd66af Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Thu, 1 Dec 2022 12:00:08 +0100 Subject: [PATCH] Use `expect` --- examples/toy-chat/src/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/toy-chat/src/protocol.rs b/examples/toy-chat/src/protocol.rs index 17dc3d8..f09e82d 100644 --- a/examples/toy-chat/src/protocol.rs +++ b/examples/toy-chat/src/protocol.rs @@ -37,6 +37,6 @@ impl Chat2Message { } pub fn timestamp(&self) -> DateTime { - Utc.timestamp_opt(self.timestamp as i64, 0).unwrap() + Utc.timestamp_opt(self.timestamp as i64, 0).expect("Timestamps should not come out of bounds") } }