]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix Windows
authorValentine Wallace <vwallace@protonmail.com>
Wed, 7 Apr 2021 17:44:59 +0000 (13:44 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 9 Apr 2021 14:08:27 +0000 (10:08 -0400)
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); }
 }