aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/window/mod.rs2
-rw-r--r--src/x11/window/monitor.rs2
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 44c5e84..46f2062 100644
--- a/src/x11/window/monitor.rs
+++ b/src/x11/window/monitor.rs
@@ -19,7 +19,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
}