diff --git a/druid-shell/src/backend/wayland/clipboard.rs b/druid-shell/src/backend/wayland/clipboard.rs index abcc4c285..2ad9c20f0 100644 --- a/druid-shell/src/backend/wayland/clipboard.rs +++ b/druid-shell/src/backend/wayland/clipboard.rs @@ -247,7 +247,7 @@ impl Clipboard { /// Get a string from the system clipboard, if one is available. pub fn get_string(&self) -> Option { - vec![Clipboard::UTF8, Clipboard::TEXT, Clipboard::UTF8_STRING] + [Clipboard::UTF8, Clipboard::TEXT, Clipboard::UTF8_STRING] .iter() .find_map( |mimetype| match std::str::from_utf8(&self.inner.receive(*mimetype)?) { diff --git a/druid-shell/src/backend/wayland/keyboard.rs b/druid-shell/src/backend/wayland/keyboard.rs index c6ed94e94..4b55c3d8a 100644 --- a/druid-shell/src/backend/wayland/keyboard.rs +++ b/druid-shell/src/backend/wayland/keyboard.rs @@ -384,7 +384,6 @@ impl Manager { if let Some(windata) = winhandle.data() { windata.with_handler({ let windata = windata.clone(); - let evt = evt; move |handler| match evt.state { KeyState::Up => { handler.key_up(evt.clone()); diff --git a/druid-shell/src/backend/wayland/window.rs b/druid-shell/src/backend/wayland/window.rs index d5872df8f..3a7df3fdd 100644 --- a/druid-shell/src/backend/wayland/window.rs +++ b/druid-shell/src/backend/wayland/window.rs @@ -424,7 +424,7 @@ impl WindowBuilder { } pub fn build(self) -> Result { - if matches!(self.menu, Some(_)) { + if self.menu.is_some() { tracing::warn!("menus unimplemented for wayland"); } @@ -552,7 +552,7 @@ pub mod layershell { let handle = WindowHandle::new( surface.clone(), - surfaces::surface::Dead::default(), + surfaces::surface::Dead, surface.clone(), surface.clone(), self.appdata.clone(), @@ -622,7 +622,7 @@ pub mod popup { let handle = WindowHandle::new( surface.clone(), - surfaces::surface::Dead::default(), + surfaces::surface::Dead, surface.clone(), surface.clone(), wappdata, diff --git a/druid/examples/sub_window.rs b/druid/examples/sub_window.rs index 494951396..27e83f9b2 100644 --- a/druid/examples/sub_window.rs +++ b/druid/examples/sub_window.rs @@ -369,7 +369,7 @@ fn build_root_widget() -> impl Widget { // arrange the two widgets vertically, with some padding let layout = Flex::column() .with_child(label) - .with_flex_child(ScreenThing.lens(Unit::default()).padding(5.), 1.) + .with_flex_child(ScreenThing.lens(Unit).padding(5.), 1.) .with_spacer(VERTICAL_WIDGET_SPACING) .with_child(textbox) .with_child(button)