aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-01-05 15:12:28 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-01-05 15:12:28 +0100
commit25b261975c6756a3e0f9ee36107f185103b35292 (patch)
treeeb3c92dac3696742341c97bcd1d3ca2ce1fe42a1
parentbfd21793a8cc8c04b9f4ad294e11f7e6aa435bd7 (diff)
parent885d5e9c386df2a4057a34871f8095260c33c493 (diff)
downloadglutin-25b261975c6756a3e0f9ee36107f185103b35292.tar.gz
glutin-25b261975c6756a3e0f9ee36107f185103b35292.zip
Merge pull request #186 from tomaka/update-rustc
Update for Rustc
-rw-r--r--src/win32/mod.rs8
-rw-r--r--src/win32/monitor.rs2
-rw-r--r--src/x11/headless.rs2
-rw-r--r--src/x11/window/mod.rs4
4 files changed, 8 insertions, 8 deletions
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<MonitorID> {
// 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 {
diff --git a/src/x11/headless.rs b/src/x11/headless.rs
index 22d0654..b4a6ba0 100644
--- a/src/x11/headless.rs
+++ b/src/x11/headless.rs
@@ -19,7 +19,7 @@ impl HeadlessContext {
Ok(HeadlessContext {
width: dimensions.0,
height: dimensions.1,
- buffer: Vec::from_elem(dimensions.0 * dimensions.1, unsafe { mem::uninitialized() }),
+ buffer: ::std::iter::repeat(unsafe { mem::uninitialized() }).take(dimensions.0 * dimensions.1).collect(),
context: unsafe {
let ctxt = ffi::OSMesaCreateContext(0x1908, ptr::null());
if ctxt.is_null() {
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index 1309fd4..9d79ad4 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -351,7 +351,7 @@ impl Window {
}
pub fn is_closed(&self) -> bool {
- use std::sync::atomic::Relaxed;
+ use std::sync::atomic::Ordering::Relaxed;
self.is_closed.load(Relaxed)
}
@@ -453,7 +453,7 @@ impl Window {
ffi::ClientMessage => {
use events::Event::{Closed, Awakened};
- use std::sync::atomic::Relaxed;
+ use std::sync::atomic::Ordering::Relaxed;
let client_msg: &ffi::XClientMessageEvent = unsafe { mem::transmute(&xev) };