From 4525c4bb1a931e9ffc8ee4bf5b9e5db2472422f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Fri, 8 Sep 2023 16:25:27 +0200 Subject: [PATCH] fixup: chrono warning --- .../src/types/conversions/wireguard.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mullvad-management-interface/src/types/conversions/wireguard.rs b/mullvad-management-interface/src/types/conversions/wireguard.rs index 13b94c1d52fd..1d361a4ffb08 100644 --- a/mullvad-management-interface/src/types/conversions/wireguard.rs +++ b/mullvad-management-interface/src/types/conversions/wireguard.rs @@ -1,5 +1,6 @@ use super::FromProtobufTypeError; use crate::types::proto; +use chrono::TimeZone; use prost_types::Timestamp; impl From for proto::PublicKey { @@ -29,7 +30,7 @@ impl TryFrom for mullvad_types::wireguard::PublicKey { Ok(mullvad_types::wireguard::PublicKey { key: talpid_types::net::wireguard::PublicKey::try_from(public_key.key.as_slice()) .map_err(|_| FromProtobufTypeError::InvalidArgument("invalid wireguard key"))?, - created: chrono::DateTime::::from_utc(ndt, chrono::Utc), + created: chrono::Utc.from_utc_datetime(&ndt), }) } }