From b244a53240de9b6c0bb20b2552a171a73007a4f4 Mon Sep 17 00:00:00 2001 From: u007d Date: Fri, 26 Jun 2020 05:49:34 -0700 Subject: [PATCH] fixed warning from use of deprecated `ONCE_INIT` --- src/macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index 186cfc833c6..609d988c07a 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -466,7 +466,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)] @@ -479,7 +479,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 {