Skip to content

Commit

Permalink
fixup: chrono warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Sep 8, 2023
1 parent 34f337b commit 4525c4b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::FromProtobufTypeError;
use crate::types::proto;
use chrono::TimeZone;
use prost_types::Timestamp;

impl From<mullvad_types::wireguard::PublicKey> for proto::PublicKey {
Expand Down Expand Up @@ -29,7 +30,7 @@ impl TryFrom<proto::PublicKey> 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::<chrono::Utc>::from_utc(ndt, chrono::Utc),
created: chrono::Utc.from_utc_datetime(&ndt),
})
}
}
Expand Down

0 comments on commit 4525c4b

Please sign in to comment.