Modernize AtomicBool initializer in Windows code

This commit is contained in:
Simonas Kazlauskas
2020-04-05 22:08:24 +03:00
parent 32368c0de5
commit f6c47942b5
+2 -2
View File
@@ -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<T> fmt::Debug for Symbol<T> {
}
static USE_ERRORMODE: AtomicBool = ATOMIC_BOOL_INIT;
static USE_ERRORMODE: AtomicBool = AtomicBool::new(false);
struct ErrorModeGuard(DWORD);
impl ErrorModeGuard {