mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
use std::sync::Once::new() rather than ONCE_INIT
Updated to v3-master per discussion on #1521
This commit is contained in:
parent
180b6b82de
commit
7f835ed24d
1 changed files with 2 additions and 2 deletions
|
@ -459,7 +459,7 @@ macro_rules! crate_version {
|
||||||
macro_rules! crate_authors {
|
macro_rules! crate_authors {
|
||||||
($sep:expr) => {{
|
($sep:expr) => {{
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
|
|
||||||
#[allow(missing_copy_implementations)]
|
#[allow(missing_copy_implementations)]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
@ -472,7 +472,7 @@ macro_rules! crate_authors {
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
fn deref(&self) -> &'static str {
|
fn deref(&self) -> &'static str {
|
||||||
static ONCE: Once = ONCE_INIT;
|
static ONCE: Once = Once::new();
|
||||||
static mut VALUE: *const String = 0 as *const String;
|
static mut VALUE: *const String = 0 as *const String;
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in a new issue