Skip to content

Commit

Permalink
Modernize AtomicBool initializer in Windows code
Browse files Browse the repository at this point in the history
  • Loading branch information
nagisa committed Apr 5, 2020
1 parent 7398d96 commit c951db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/os/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c951db8

Please # to comment.