mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Fix compilation by replacing "range" with ".." syntax
This commit is contained in:
parent
3ad95d5867
commit
3413a2d973
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue