mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 14:51:15 +00:00
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:
parent
58e85ef317
commit
e01da55c22
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue