From 885d5e9c386df2a4057a34871f8095260c33c493 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 5 Jan 2015 14:30:42 +0100 Subject: Update for Rustc --- src/win32/mod.rs | 8 ++++---- src/win32/monitor.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/win32') diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 78e2265..9c78a8a 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -102,7 +102,7 @@ impl WindowProxy { impl Window { /// See the docs in the crate root file. pub fn is_closed(&self) -> bool { - use std::sync::atomic::Relaxed; + use std::sync::atomic::Ordering::Relaxed; self.is_closed.load(Relaxed) } @@ -213,7 +213,7 @@ impl Window { // if one of the received events is `Closed`, setting `is_closed` to true if events.iter().any(|e| match e { &::events::Event::Closed => true, _ => false }) { - use std::sync::atomic::Relaxed; + use std::sync::atomic::Ordering::Relaxed; self.is_closed.store(true, Relaxed); } @@ -228,7 +228,7 @@ impl Window { // if the received event is `Closed`, setting `is_closed` to true match ev { ::events::Event::Closed => { - use std::sync::atomic::Relaxed; + use std::sync::atomic::Ordering::Relaxed; self.is_closed.store(true, Relaxed); }, _ => () @@ -241,7 +241,7 @@ impl Window { }, Err(_) => { - use std::sync::atomic::Relaxed; + use std::sync::atomic::Ordering::Relaxed; self.is_closed.store(true, Relaxed); RingBuf::new() } diff --git a/src/win32/monitor.rs b/src/win32/monitor.rs index 4aca57b..4bc9cad 100644 --- a/src/win32/monitor.rs +++ b/src/win32/monitor.rs @@ -58,7 +58,7 @@ pub fn get_available_monitors() -> RingBuf { // computing the human-friendly name let readable_name = String::from_utf16_lossy(output.DeviceString.as_slice()); - let readable_name = readable_name.as_slice().trim_right_chars(0 as char).to_string(); + let readable_name = readable_name.as_slice().trim_right_matches(0 as char).to_string(); // getting the position let (position, dimensions) = unsafe { -- cgit v1.2.3