Update Clippy to v1.73 (#3135)
This commit is contained in:
parent
ee0db52ac4
commit
48a1e84906
3 changed files with 7 additions and 7 deletions
|
|
@ -114,9 +114,9 @@ impl Dispatch<WlKeyboard, KeyboardData, WinitState> for WinitState {
|
|||
}
|
||||
WlKeyboardEvent::Key {
|
||||
key,
|
||||
state: key_state,
|
||||
state: WEnum::Value(WlKeyState::Pressed),
|
||||
..
|
||||
} if key_state == WEnum::Value(WlKeyState::Pressed) => {
|
||||
} => {
|
||||
let key = key + 8;
|
||||
|
||||
key_input(
|
||||
|
|
@ -184,9 +184,9 @@ impl Dispatch<WlKeyboard, KeyboardData, WinitState> for WinitState {
|
|||
}
|
||||
WlKeyboardEvent::Key {
|
||||
key,
|
||||
state: key_state,
|
||||
state: WEnum::Value(WlKeyState::Released),
|
||||
..
|
||||
} if key_state == WEnum::Value(WlKeyState::Released) => {
|
||||
} => {
|
||||
let key = key + 8;
|
||||
|
||||
key_input(
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ fn get_logical_key_char(ns_event: &NSEvent, modifierless_chars: &str) -> Key {
|
|||
let string = ns_event
|
||||
.charactersIgnoringModifiers()
|
||||
.map(|s| s.to_string())
|
||||
.unwrap_or_else(String::new);
|
||||
.unwrap_or_default();
|
||||
if string.is_empty() {
|
||||
// Probably a dead key
|
||||
let first_char = modifierless_chars.chars().next();
|
||||
|
|
@ -126,7 +126,7 @@ pub(crate) fn create_key_event(
|
|||
let characters = ns_event
|
||||
.characters()
|
||||
.map(|s| s.to_string())
|
||||
.unwrap_or_else(String::new);
|
||||
.unwrap_or_default();
|
||||
if characters.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -850,7 +850,7 @@ impl WinitView {
|
|||
.expect("input context")
|
||||
.selectedKeyboardInputSource()
|
||||
.map(|input_source| input_source.to_string())
|
||||
.unwrap_or_else(String::new)
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
pub(super) fn set_cursor_icon(&self, icon: Id<NSCursor>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue