From 05411b2b322692f0052f0c5b2eefcbb14883f338 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Tue, 29 Jan 2019 13:05:16 -0500 Subject: [PATCH] deprecated: remove use of ATOMIC_BOOL_INIT Our MSRV is high enough that we can use const functions now. --- src/messages.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/messages.rs b/src/messages.rs index 9d134a1..dc013e1 100644 --- a/src/messages.rs +++ b/src/messages.rs @@ -1,8 +1,8 @@ -use std::sync::atomic::{ATOMIC_BOOL_INIT, AtomicBool, Ordering}; +use std::sync::atomic::{AtomicBool, Ordering}; -static MESSAGES: AtomicBool = ATOMIC_BOOL_INIT; -static IGNORE_MESSAGES: AtomicBool = ATOMIC_BOOL_INIT; -static ERRORED: AtomicBool = ATOMIC_BOOL_INIT; +static MESSAGES: AtomicBool = AtomicBool::new(false); +static IGNORE_MESSAGES: AtomicBool = AtomicBool::new(false); +static ERRORED: AtomicBool = AtomicBool::new(false); /// Emit a non-fatal error message, unless messages were disabled. #[macro_export]