diff options
-rw-r--r-- | src/x11/window/mod.rs | 2 | ||||
-rw-r--r-- | 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<MonitorID> { }; 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 } |