mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 12:50:04 -04:00
Iterators returned by wait_events and poll_events are now persistent
This commit is contained in:
@@ -47,6 +47,6 @@ fn main() {
|
||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||
window.swap_buffers();
|
||||
|
||||
println!("{:?}", window.wait_events().collect::<Vec<glutin::Event>>());
|
||||
println!("{:?}", window.wait_events().next());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ fn run(window: glutin::Window, color: (f32, f32, f32, f32)) {
|
||||
context.draw_frame(color);
|
||||
window.swap_buffers();
|
||||
|
||||
window.wait_events().collect::<Vec<glutin::Event>>();
|
||||
window.wait_events().next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,6 @@ fn main() {
|
||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||
window.swap_buffers();
|
||||
|
||||
println!("{:?}", window.wait_events().collect::<Vec<glutin::Event>>());
|
||||
println!("{:?}", window.wait_events().next());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user