Merge pull request #322 from nicholasbishop/bishop-range-fix

Fix compilation by replacing "range" with ".." syntax
This commit is contained in:
tomaka 2015-03-23 07:22:30 +01:00
commit 09e00564a9
2 changed files with 2 additions and 2 deletions

View file

@ -348,7 +348,7 @@ impl Window {
return Err(OsError(format!("Could not query the video modes"))); 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 _); 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 { if mode.hdisplay == dimensions.0 as u16 && mode.vdisplay == dimensions.1 as u16 {
best_mode = i; best_mode = i;

View file

@ -18,7 +18,7 @@ pub fn get_available_monitors() -> VecDeque<MonitorID> {
}; };
let mut monitors = VecDeque::new(); 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 monitors
} }