diff --git a/src/event_loop.rs b/src/event_loop.rs index b8fd4ca4..241d4a9b 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -37,9 +37,10 @@ pub struct EventLoop { /// Target that associates windows with an `EventLoop`. /// -/// This type exists to allow you to create new windows while Winit executes your callback. -/// `EventLoop` will coerce into this type, so functions that take this as a parameter can also -/// take `&EventLoop`. +/// This type exists to allow you to create new windows while Winit executes +/// your callback. `EventLoop` will coerce into this type (`impl Deref for +/// EventLoop`), so functions that take this as a parameter can also take +/// `&EventLoop`. pub struct EventLoopWindowTarget { pub(crate) p: platform_impl::EventLoopWindowTarget, pub(crate) _marker: ::std::marker::PhantomData<*mut ()>, // Not Send nor Sync diff --git a/src/platform_impl/ios/app_state.rs b/src/platform_impl/ios/app_state.rs index 5b982b14..32dae8ed 100644 --- a/src/platform_impl/ios/app_state.rs +++ b/src/platform_impl/ios/app_state.rs @@ -577,9 +577,9 @@ impl EventLoopWaker { fn new(rl: CFRunLoopRef) -> EventLoopWaker { extern "C" fn wakeup_main_loop(_timer: CFRunLoopTimerRef, _info: *mut c_void) {} unsafe { - // create a timer with a 1microsec interval (1ns does not work) to mimic polling. - // it is initially setup with a first fire time really far into the - // future, but that gets changed to fire immediatley in did_finish_launching + // Create a timer with a 0.1µs interval (1ns does not work) to mimic polling. + // It is initially setup with a first fire time really far into the + // future, but that gets changed to fire immediately in did_finish_launching let timer = CFRunLoopTimerCreate( ptr::null_mut(), std::f64::MAX, diff --git a/src/platform_impl/ios/event_loop.rs b/src/platform_impl/ios/event_loop.rs index 469d11b1..adbdd7c3 100644 --- a/src/platform_impl/ios/event_loop.rs +++ b/src/platform_impl/ios/event_loop.rs @@ -163,7 +163,7 @@ impl Drop for EventLoopProxy { impl EventLoopProxy { fn new(sender: Sender) -> EventLoopProxy { unsafe { - // just wakeup the eventloop + // just wake up the eventloop extern "C" fn event_loop_proxy_handler(_: *mut c_void) {} // adding a Source to the main CFRunLoop lets us wake it up and diff --git a/src/platform_impl/macos/event_loop.rs b/src/platform_impl/macos/event_loop.rs index 2ad17e1d..1631daa8 100644 --- a/src/platform_impl/macos/event_loop.rs +++ b/src/platform_impl/macos/event_loop.rs @@ -120,7 +120,7 @@ unsafe impl Sync for Proxy {} impl Proxy { fn new(sender: mpsc::Sender) -> Self { unsafe { - // just wakeup the eventloop + // just wake up the eventloop extern "C" fn event_loop_proxy_handler(_: *mut c_void) {} // adding a Source to the main CFRunLoop lets us wake it up and diff --git a/src/platform_impl/macos/observer.rs b/src/platform_impl/macos/observer.rs index ddd20a8f..db7a61d7 100644 --- a/src/platform_impl/macos/observer.rs +++ b/src/platform_impl/macos/observer.rs @@ -204,9 +204,9 @@ impl Default for EventLoopWaker { fn default() -> EventLoopWaker { extern "C" fn wakeup_main_loop(_timer: CFRunLoopTimerRef, _info: *mut c_void) {} unsafe { - // create a timer with a 1µs interval (1ns does not work) to mimic polling. - // it is initially setup with a first fire time really far into the - // future, but that gets changed to fire immediatley in did_finish_launching + // Create a timer with a 0.1µs interval (1ns does not work) to mimic polling. + // It is initially setup with a first fire time really far into the + // future, but that gets changed to fire immediately in did_finish_launching let timer = CFRunLoopTimerCreate( ptr::null_mut(), std::f64::MAX,