mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
Fix type mismatch error with latest winit (#3883)
# Objective
When I use the latest winit with bevy main, I got this error.
```
error[E0308]: mismatched types
--> /Users/ryo/.cargo/git/checkouts/bevy-f7ffde730c324c74/b13f238/crates/bevy_winit/src/lib.rs:191:5
|
191 | event_loop.run_return(event_handler)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `i32`
|
help: consider using a semicolon here
|
191 | event_loop.run_return(event_handler);
| +
help: try adding a return type
|
187 | -> i32 where
| ++++++
```
In [this commit](a52f755ce8
), the signature of `run_return` was changed in winit.
## Solution
This tiny PR does not add support for exit code, but makes compilation successful.
This commit is contained in:
parent
6615b7bf64
commit
1e049a651b
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ where
|
|||
F: FnMut(Event<'_, ()>, &EventLoopWindowTarget<()>, &mut ControlFlow),
|
||||
{
|
||||
use winit::platform::run_return::EventLoopExtRunReturn;
|
||||
event_loop.run_return(event_handler)
|
||||
event_loop.run_return(event_handler);
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
|
|
Loading…
Reference in a new issue