Remove EventLoopExtRunReturn

This commit is contained in:
Robert Bragg 2023-06-18 12:59:53 +01:00 committed by Kirill Chibisov
parent c47d0846fa
commit a6f414d732
12 changed files with 7 additions and 212 deletions

View file

@ -255,17 +255,6 @@ impl<T: 'static> EventLoop<T> {
::std::process::exit(exit_code);
}
pub fn run_return<F>(&mut self, event_handler: F) -> i32
where
F: FnMut(Event<'_, T>, &RootELW<T>, &mut ControlFlow),
{
match self.run_ondemand(event_handler) {
Err(RunLoopError::ExitFailure(code)) => code,
Err(_err) => 1,
Ok(_) => 0,
}
}
pub fn run_ondemand<F>(&mut self, mut event_handler: F) -> Result<(), RunLoopError>
where
F: FnMut(Event<'_, T>, &RootELW<T>, &mut ControlFlow),