From 7f835ed24db408e664c6fac42ce5ddc88b38956b Mon Sep 17 00:00:00 2001 From: demoray Date: Tue, 23 Jul 2019 10:03:07 -0400 Subject: [PATCH] use std::sync::Once::new() rather than ONCE_INIT Updated to v3-master per discussion on #1521 --- src/macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index 41982643..05881c66 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -459,7 +459,7 @@ macro_rules! crate_version { macro_rules! crate_authors { ($sep:expr) => {{ use std::ops::Deref; - use std::sync::{Once, ONCE_INIT}; + use std::sync::Once; #[allow(missing_copy_implementations)] #[allow(dead_code)] @@ -472,7 +472,7 @@ macro_rules! crate_authors { #[allow(unsafe_code)] fn deref(&self) -> &'static str { - static ONCE: Once = ONCE_INIT; + static ONCE: Once = Once::new(); static mut VALUE: *const String = 0 as *const String; unsafe {