winit: Suppress warnings when building for WASM

I am not happy with the `allow(unused)`, but putting
`cfg(not(target_family = "wasm"))` was getting out of
hand.
This commit is contained in:
Tobias Hunger 2024-08-14 09:00:42 +00:00 committed by Tobias Hunger
parent 58e85ef317
commit e01da55c22

View file

@ -83,7 +83,7 @@ impl NotRunningEventLoop {
Ok(Self {
instance,
event_loop_proxy,
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_family = "wasm"))]
clipboard: Rc::new(clipboard.into()),
})
}
@ -94,7 +94,9 @@ struct RunningEventLoop<'a> {
}
pub(crate) enum ActiveOrInactiveEventLoop<'a> {
#[allow(unused)]
Active(&'a ActiveEventLoop),
#[allow(unused)]
Inactive(&'a winit::event_loop::EventLoop<SlintUserEvent>),
}
@ -103,6 +105,7 @@ pub(crate) trait EventLoopInterface {
&self,
window_attributes: winit::window::WindowAttributes,
) -> Result<winit::window::Window, winit::error::OsError>;
#[allow(unused)]
fn event_loop(&self) -> ActiveOrInactiveEventLoop<'_>;
fn is_wayland(&self) -> bool {
false