From ff5079ba73d6e744f77cdf1abbf7dcd54edd55cd Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Thu, 1 Dec 2022 11:42:05 +0100 Subject: [PATCH] Replace deprecated `chrono::TimeZone::timestamp` for `timestamp_opt` in examples --- 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 4158f06..dbcb300 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(self.timestamp as i64, 0) + Utc.timestamp_opt(self.timestamp as i64, 0) } }