Use find(...) instead of filter(...).next()

This commit is contained in:
Héctor Ramón Jiménez 2024-02-21 13:08:56 +01:00
parent 1ddfb775c2
commit 4742f3fef8
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -687,8 +687,7 @@ impl Update {
.. ..
} if state.is_focused => { } if state.is_focused => {
if let Some(text) = text { if let Some(text) = text {
if let Some(c) = if let Some(c) = text.chars().find(|c| !c.is_control())
text.chars().filter(|c| !c.is_control()).next()
{ {
return edit(Edit::Insert(c)); return edit(Edit::Insert(c));
} }