diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-03-23 07:22:30 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-03-23 07:22:30 +0100 |
commit | 09e00564a940e5d3620ee56c1b84d94f2250c070 (patch) | |
tree | 86444bc456903eb7cdb99feff7adf6425dfa2160 | |
parent | 3ad95d58679d7b3740eff791de2abe6857598ecd (diff) | |
parent | 3413a2d973f0851686c1dc286b2459afafc7f403 (diff) | |
download | glutin-09e00564a940e5d3620ee56c1b84d94f2250c070.tar.gz glutin-09e00564a940e5d3620ee56c1b84d94f2250c070.zip |
Merge pull request #322 from nicholasbishop/bishop-range-fix
Fix compilation by replacing "range" with ".." syntax
-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 } |