From 12673bfd1860b97e88e91d105fec3b01da3d1053 Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Sat, 14 Aug 2021 03:27:46 -0400 Subject: [PATCH] Make `Instant` `#[repr(transparent)]` --- src/instant.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/instant.rs b/src/instant.rs index a41f9dc07..a1f79a152 100644 --- a/src/instant.rs +++ b/src/instant.rs @@ -25,6 +25,7 @@ use crate::Duration; /// This implementation allows for operations with signed [`Duration`]s, but is otherwise identical /// to [`std::time::Instant`]. #[cfg_attr(__time_03_docs, doc(cfg(feature = "std")))] +#[repr(transparent)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Instant(pub StdInstant);