mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 13:20:06 -04:00
Update Clippy to v1.73 (#3135)
This commit is contained in:
@@ -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>) {
|
||||
|
||||
Reference in New Issue
Block a user