winit
winit copied to clipboard
Change `run_app(app: &mut A)` to `run_app(app: A)`
Since https://github.com/rust-windowing/winit/pull/3709, we do a blanket impl of ApplicationHandler
for &mut
references. This means that we can now change run_app_x
methods to consume the application instead of taking a reference to it.
This allows the user more control over how they pass their application state to Winit.
Internally, each backend is free to convert the app
to an &mut app
(or &mut dyn ApplicationHandler
) if that's easier for them to pass around.
- [ ] Tested on all platforms changed
- [x] Added an entry to the
changelog
module if knowledge of this change could be valuable to users