From 3413a2d973f0851686c1dc286b2459afafc7f403 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sun, 22 Mar 2015 18:54:18 -0400 Subject: Fix compilation by replacing "range" with ".." syntax --- src/x11/window/mod.rs | 2 +- src/x11/window/monitor.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 7845d07..385a913 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -348,7 +348,7 @@ impl Window { return Err(OsError(format!("Could not query the video modes"))); } - for i in range(0, mode_num) { + for i in 0..mode_num { let mode: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); if mode.hdisplay == dimensions.0 as u16 && mode.vdisplay == dimensions.1 as u16 { best_mode = i; diff --git a/src/x11/window/monitor.rs b/src/x11/window/monitor.rs index 77ac4ec..1dc0350 100644 --- a/src/x11/window/monitor.rs +++ b/src/x11/window/monitor.rs @@ -18,7 +18,7 @@ pub fn get_available_monitors() -> VecDeque { }; let mut monitors = VecDeque::new(); - monitors.extend(range(0, nb_monitors).map(|i| MonitorID(i as u32))); + monitors.extend((0..nb_monitors).map(|i| MonitorID(i as u32))); monitors } -- cgit v1.2.3