mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
winit/event_loop: Add register_app and run_app_never_return
To allow users to explicitly choose the run semantics that they want.
This commit is contained in:
committed by
Kirill Chibisov
parent
c98d880a1c
commit
cc23fbf3be
@@ -239,7 +239,7 @@ impl EventLoop {
|
||||
}
|
||||
|
||||
// Require `'static` for correctness, we won't be able to `Drop` the user's state otherwise.
|
||||
pub fn run_app<A: ApplicationHandler + 'static>(self, app: A) -> ! {
|
||||
pub fn run_app_never_return<A: ApplicationHandler + 'static>(self, app: A) -> ! {
|
||||
let application: Option<Retained<UIApplication>> =
|
||||
unsafe { msg_send![UIApplication::class(), sharedApplication] };
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user