Skip to content

Commit

Permalink
Satisfy clippy 1.62 (linebender#2215)
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom authored and xarvic committed Jul 29, 2022
1 parent 17544d8 commit 8ad6bb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions druid-shell/src/backend/gtk/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ const SCALE_TARGET_DPI: f64 = 96.0;
/// Taken from <https://gtk-rs.org/docs-src/tutorial/closures>
/// It is used to reduce the boilerplate of setting up gtk callbacks
/// Example:
/// ```
/// ```ignore
/// button.connect_clicked(clone!(handle => move |_| { ... }))
/// ```
/// is equivalent to:
/// ```
/// ```ignore
/// {
/// let handle = handle.clone();
/// button.connect_clicked(move |_| { ... })
Expand Down
2 changes: 1 addition & 1 deletion druid-shell/src/backend/wayland/pointers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl Pointer {
))
}
ButtonState::Released => {
let mut updated = self.buttons.borrow_mut().remove(button);
self.buttons.borrow_mut().remove(button);
self.clickevent.borrow_mut().debounce(MouseEvtKind::Up(
mouse::MouseEvent {
pos: self.pos.get(),
Expand Down
4 changes: 3 additions & 1 deletion druid-shell/src/backend/windows/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//! Safe wrapper for menus.
use std::collections::HashMap;
use std::fmt::Write as _;
use std::mem;
use std::ptr::null;

Expand Down Expand Up @@ -219,6 +220,7 @@ fn format_hotkey(key: &HotKey, s: &mut String) {
KbKey::ArrowRight => s.push_str("Right"),
KbKey::ArrowUp => s.push_str("Up"),
KbKey::ArrowDown => s.push_str("Down"),
_ => s.push_str(&format!("{:?}", key.key)),
_ => write!(s, "{}", key.key)
.unwrap_or_else(|err| tracing::warn!("Failed to convert hotkey to string: {}", err)),
}
}

0 comments on commit 8ad6bb9

Please sign in to comment.