Change run_app(app: &mut A) to run_app(app: A) (#3721)

This allows the user more control over how they pass their application state
to Winit, and will hopefully allow `Drop` implementations on the application
handler to work in the future on all platforms.
This commit is contained in:
Mads Marquart 2024-07-11 15:38:09 +02:00 committed by GitHub
parent d5fd8682eb
commit bf97def398
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 53 additions and 59 deletions

View file

@ -58,8 +58,7 @@ fn main() -> Result<(), Box<dyn Error>> {
tracing_subscriber::fmt::init();
let event_loop = EventLoop::new()?;
let mut app = XEmbedDemo { parent_window_id, window: None };
event_loop.run_app(&mut app).map_err(Into::into)
Ok(event_loop.run_app(XEmbedDemo { parent_window_id, window: None })?)
}
#[cfg(not(x11_platform))]