mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Rename run_ondemand to run_on_demand
This commit is contained in:
@@ -252,10 +252,10 @@ impl<T: 'static> EventLoop<T> {
|
||||
where
|
||||
F: FnMut(Event<T>, &RootELW<T>),
|
||||
{
|
||||
self.run_ondemand(event_handler)
|
||||
self.run_on_demand(event_handler)
|
||||
}
|
||||
|
||||
pub fn run_ondemand<F>(&mut self, mut event_handler: F) -> Result<(), EventLoopError>
|
||||
pub fn run_on_demand<F>(&mut self, mut event_handler: F) -> Result<(), EventLoopError>
|
||||
where
|
||||
F: FnMut(Event<T>, &RootELW<T>),
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@ impl<T> EventLoopRunner<T> {
|
||||
/// outlive the EventLoopRunner) and can lead to undefined behaviour if
|
||||
/// the handler is not cleared before the end of real lifetime.
|
||||
///
|
||||
/// All public APIs that take an event handler (`run`, `run_ondemand`,
|
||||
/// All public APIs that take an event handler (`run`, `run_on_demand`,
|
||||
/// `pump_events`) _must_ pair a call to `set_event_handler` with
|
||||
/// a call to `clear_event_handler` before returning to avoid
|
||||
/// undefined behaviour.
|
||||
|
||||
Reference in New Issue
Block a user