From c951db81dd66cd140d2a32fb760a84e9708764cb Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Sun, 5 Apr 2020 22:08:24 +0300 Subject: [PATCH] Modernize AtomicBool initializer in Windows code --- src/os/windows/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/windows/mod.rs b/src/os/windows/mod.rs index 646700ec9..63e351c5d 100644 --- a/src/os/windows/mod.rs +++ b/src/os/windows/mod.rs @@ -9,7 +9,7 @@ use util::{ensure_compatible_types, cstr_cow_from_bytes}; use std::ffi::{OsStr, OsString}; use std::{fmt, io, marker, mem, ptr}; use std::os::windows::ffi::{OsStrExt, OsStringExt}; -use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering}; +use std::sync::atomic::{AtomicBool, Ordering}; /// A platform-specific equivalent of the cross-platform `Library`. pub struct Library(HMODULE); @@ -214,7 +214,7 @@ impl fmt::Debug for Symbol { } -static USE_ERRORMODE: AtomicBool = ATOMIC_BOOL_INIT; +static USE_ERRORMODE: AtomicBool = AtomicBool::new(false); struct ErrorModeGuard(DWORD); impl ErrorModeGuard {