diff --git a/src/lib.rs b/src/lib.rs index 18ef6df..0e01b03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -104,8 +104,6 @@ mod window_flags; #[cfg(target_os = "macos")] use self::os::macos as imp; -#[cfg(target_os = "redox")] -use self::os::redox as imp; #[cfg(any( target_os = "linux", target_os = "freebsd", @@ -114,6 +112,8 @@ use self::os::redox as imp; target_os = "openbsd" ))] use self::os::posix as imp; +#[cfg(target_os = "redox")] +use self::os::redox as imp; #[cfg(target_os = "windows")] use self::os::windows as imp; /// diff --git a/src/os/mod.rs b/src/os/mod.rs index a298d0d..ed1caf2 100644 --- a/src/os/mod.rs +++ b/src/os/mod.rs @@ -1,7 +1,5 @@ #[cfg(target_os = "macos")] pub mod macos; -#[cfg(target_os = "redox")] -pub mod redox; #[cfg(any( target_os = "linux", target_os = "freebsd", @@ -10,5 +8,7 @@ pub mod redox; target_os = "openbsd" ))] pub mod posix; +#[cfg(target_os = "redox")] +pub mod redox; #[cfg(target_os = "windows")] pub mod windows; diff --git a/src/os/windows/mod.rs b/src/os/windows/mod.rs index 40f5d85..e60d57b 100644 --- a/src/os/windows/mod.rs +++ b/src/os/windows/mod.rs @@ -767,7 +767,9 @@ impl Window { unsafe { let mut msg = mem::zeroed(); - while winuser::PeekMessageW(&mut msg, std::ptr::null_mut(), 0, 0, winuser::PM_REMOVE) != 0 { + while winuser::PeekMessageW(&mut msg, std::ptr::null_mut(), 0, 0, winuser::PM_REMOVE) + != 0 + { // Make this code a bit nicer if self.accel_table == ptr::null_mut() { winuser::TranslateMessage(&mut msg);