Use find(...) instead of filter(...).next()
This commit is contained in:
parent
1ddfb775c2
commit
4742f3fef8
1 changed files with 1 additions and 2 deletions
|
|
@ -687,8 +687,7 @@ impl Update {
|
|||
..
|
||||
} if state.is_focused => {
|
||||
if let Some(text) = text {
|
||||
if let Some(c) =
|
||||
text.chars().filter(|c| !c.is_control()).next()
|
||||
if let Some(c) = text.chars().find(|c| !c.is_control())
|
||||
{
|
||||
return edit(Edit::Insert(c));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue