parent
57981b533d
commit
10419ff441
72 changed files with 377 additions and 312 deletions
|
|
@ -94,6 +94,8 @@ impl<T> EventLoopBuilder<T> {
|
|||
/// will fall back on X11. If this variable is set with any other value, winit will panic.
|
||||
#[inline]
|
||||
pub fn build(&mut self) -> EventLoop<T> {
|
||||
// Certain platforms accept a mutable reference in their API.
|
||||
#[allow(clippy::unnecessary_mut_passed)]
|
||||
EventLoop {
|
||||
event_loop: platform_impl::EventLoop::new(&mut self.platform_specific),
|
||||
_marker: PhantomData,
|
||||
|
|
@ -221,6 +223,12 @@ impl EventLoop<()> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for EventLoop<()> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> EventLoop<T> {
|
||||
#[deprecated = "Use `EventLoopBuilder::<T>::with_user_event().build()` instead."]
|
||||
pub fn with_user_event() -> EventLoop<T> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue