Skip to content

Commit

Permalink
Wayland lints
Browse files Browse the repository at this point in the history
  • Loading branch information
atlanticaccent committed Nov 17, 2023
1 parent a5c7ce4 commit 9f5531f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion druid-shell/src/backend/wayland/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl Clipboard {

/// Get a string from the system clipboard, if one is available.
pub fn get_string(&self) -> Option<String> {
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)?) {
Expand Down
1 change: 0 additions & 1 deletion druid-shell/src/backend/wayland/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
6 changes: 3 additions & 3 deletions druid-shell/src/backend/wayland/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl WindowBuilder {
}

pub fn build(self) -> Result<WindowHandle, ShellError> {
if matches!(self.menu, Some(_)) {
if self.menu.is_some() {
tracing::warn!("menus unimplemented for wayland");
}

Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion druid/examples/sub_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ fn build_root_widget() -> impl Widget<HelloState> {
// 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)
Expand Down

0 comments on commit 9f5531f

Please sign in to comment.