From 131e67ddc172b07e9fe65814ad5ad9a0277e5a4f Mon Sep 17 00:00:00 2001 From: Brian Kabiro Date: Mon, 29 Jul 2019 17:58:16 +0300 Subject: [PATCH] Rename `new_user_event` method to `with_user_event` (#1057) (#1068) Finishes #1057 --- CHANGELOG.md | 1 + examples/proxy.rs | 2 +- src/event_loop.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea99659b..e7e3d8fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - On X11, fix delayed events after window redraw. - On macOS, add `WindowBuilderExt::with_disallow_hidpi` to have the option to turn off best resolution openGL surface. - On Windows, screen saver won't start if the window is in fullscreen mode. +- Change all occurrences of the `new_user_event` method to `with_user_event`. # 0.20.0 Alpha 2 (2019-07-09) diff --git a/examples/proxy.rs b/examples/proxy.rs index 06198ecd..d078f230 100644 --- a/examples/proxy.rs +++ b/examples/proxy.rs @@ -5,7 +5,7 @@ use winit::{ }; fn main() { - let event_loop: EventLoop = EventLoop::new_user_event(); + let event_loop: EventLoop = EventLoop::with_user_event(); let _window = WindowBuilder::new() .with_title("A fantastic window!") diff --git a/src/event_loop.rs b/src/event_loop.rs index 241d4a9b..a7a1134c 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -100,7 +100,7 @@ impl EventLoop<()> { /// /// - **iOS:** Can only be called on the main thread. pub fn new() -> EventLoop<()> { - EventLoop::<()>::new_user_event() + EventLoop::<()>::with_user_event() } } @@ -115,7 +115,7 @@ impl EventLoop { /// ## Platform-specific /// /// - **iOS:** Can only be called on the main thread. - pub fn new_user_event() -> EventLoop { + pub fn with_user_event() -> EventLoop { EventLoop { event_loop: platform_impl::EventLoop::new(), _marker: ::std::marker::PhantomData,