Explicitly specify minimum supported rust version
This should help with distributing apps using winit. Fixes #1075.
This commit is contained in:
parent
50035643f7
commit
bf537009d9
8 changed files with 15 additions and 9 deletions
|
|
@ -299,10 +299,11 @@ impl WindowExtUnix for Window {
|
|||
#[inline]
|
||||
#[cfg(feature = "wayland")]
|
||||
fn wayland_set_csd_theme(&self, theme: Theme) {
|
||||
#[allow(clippy::single_match)]
|
||||
match self.window {
|
||||
LinuxWindow::Wayland(ref w) => w.set_csd_theme(theme),
|
||||
#[cfg(feature = "x11")]
|
||||
_ => {}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ pub unsafe fn handle_main_events_cleared() {
|
|||
return;
|
||||
}
|
||||
match this.state_mut() {
|
||||
&mut AppStateImpl::ProcessingEvents { .. } => {}
|
||||
AppStateImpl::ProcessingEvents { .. } => {}
|
||||
_ => bug!("`ProcessingRedraws` happened unexpectedly"),
|
||||
};
|
||||
drop(this);
|
||||
|
|
|
|||
|
|
@ -587,7 +587,8 @@ impl Window {
|
|||
|
||||
/// Hooks for X11 errors.
|
||||
#[cfg(feature = "x11")]
|
||||
pub(crate) static mut XLIB_ERROR_HOOKS: Mutex<Vec<XlibErrorHook>> = Mutex::new(Vec::new());
|
||||
pub(crate) static mut XLIB_ERROR_HOOKS: Lazy<Mutex<Vec<XlibErrorHook>>> =
|
||||
Lazy::new(|| Mutex::new(Vec::new()));
|
||||
|
||||
#[cfg(feature = "x11")]
|
||||
unsafe extern "C" fn x_error_callback(
|
||||
|
|
@ -633,7 +634,7 @@ unsafe extern "C" fn x_error_callback(
|
|||
|
||||
pub enum EventLoop<T: 'static> {
|
||||
#[cfg(feature = "wayland")]
|
||||
Wayland(wayland::EventLoop<T>),
|
||||
Wayland(Box<wayland::EventLoop<T>>),
|
||||
#[cfg(feature = "x11")]
|
||||
X(x11::EventLoop<T>),
|
||||
}
|
||||
|
|
@ -723,7 +724,7 @@ impl<T: 'static> EventLoop<T> {
|
|||
|
||||
#[cfg(feature = "wayland")]
|
||||
fn new_wayland_any_thread() -> Result<EventLoop<T>, Box<dyn Error>> {
|
||||
wayland::EventLoop::new().map(EventLoop::Wayland)
|
||||
wayland::EventLoop::new().map(|evlp| EventLoop::Wayland(Box::new(evlp)))
|
||||
}
|
||||
|
||||
#[cfg(feature = "x11")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue