Fix Windows
[rust-lightning] / lightning-invoice / src / lib.rs
index 62e5bf16885806f32c108055c57e941169dc9077..e9ca442f2b2006ea5ff343a0d4785ce7dc945899 100644 (file)
@@ -57,7 +57,7 @@ const MAX_EXPIRY_TIME: u64 = 60 * 60 * 24 * 356;
 fn __system_time_size_check() {
        // Use 2 * sizeof(u64) as expected size since the expected underlying implementation is storing
        // a `Duration` since `SystemTime::UNIX_EPOCH`.
-       unsafe { std::mem::transmute::<SystemTime, [u8; 16]>(UNIX_EPOCH); }
+       unsafe { std::mem::transmute_copy::<SystemTime, [u8; 16]>(&UNIX_EPOCH); }
 }