use std::sync::Once::new() rather than ONCE_INIT

Updated to v3-master per discussion on #1521
This commit is contained in:
demoray 2019-07-23 10:03:07 -04:00 committed by GitHub
parent 180b6b82de
commit 7f835ed24d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {