Update Clippy to v1.73 (#3135)

This commit is contained in:
daxpedda 2023-10-08 01:21:46 +02:00 committed by GitHub
parent ee0db52ac4
commit 48a1e84906
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -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(

View file

@ -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 {

View file

@ -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>) {