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/x11/headless.rs | 2 +- src/x11/window/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/x11') 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) }; -- cgit v1.2.3