Remove allow(unused_mut) in winit::application
This commit is contained in:
parent
518ec52ebd
commit
a631f4d745
1 changed files with 18 additions and 15 deletions
|
|
@ -213,8 +213,7 @@ where
|
|||
|
||||
let mut context = task::Context::from_waker(task::noop_waker_ref());
|
||||
|
||||
#[allow(unused_mut)]
|
||||
let mut process_event =
|
||||
let process_event =
|
||||
move |event, event_loop: &winit::event_loop::EventLoopWindowTarget<_>| {
|
||||
if event_loop.exiting() {
|
||||
return;
|
||||
|
|
@ -244,20 +243,24 @@ where
|
|||
// since the event loop does not resume during resize interaction.
|
||||
// More details: https://github.com/rust-windowing/winit/issues/3272
|
||||
#[cfg(target_os = "windows")]
|
||||
let _ = event_loop.run(move |event, event_loop| {
|
||||
if matches!(
|
||||
event,
|
||||
winit::event::Event::WindowEvent {
|
||||
event: winit::event::WindowEvent::Resized(_),
|
||||
..
|
||||
{
|
||||
let mut process_event = process_event;
|
||||
|
||||
let _ = event_loop.run(move |event, event_loop| {
|
||||
if matches!(
|
||||
event,
|
||||
winit::event::Event::WindowEvent {
|
||||
event: winit::event::WindowEvent::Resized(_),
|
||||
..
|
||||
}
|
||||
) {
|
||||
process_event(event, event_loop);
|
||||
process_event(winit::event::Event::AboutToWait, event_loop);
|
||||
} else {
|
||||
process_event(event, event_loop);
|
||||
}
|
||||
) {
|
||||
process_event(event, event_loop);
|
||||
process_event(winit::event::Event::AboutToWait, event_loop);
|
||||
} else {
|
||||
process_event(event, event_loop);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue