aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/state.rs')
-rw-r--r--helix-core/src/state.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs
index ffe88c3f..aa377091 100644
--- a/helix-core/src/state.rs
+++ b/helix-core/src/state.rs
@@ -358,7 +358,7 @@ where
{
let mut chars = slice.chars_at(*pos);
- while let Some(ch) = chars.next() {
+ for ch in chars {
if !fun(ch) {
break;
}
@@ -372,7 +372,6 @@ where
{
// need to +1 so that prev() includes current char
let mut chars = slice.chars_at(*pos + 1);
- let mut chars = slice.chars_at(*pos + 1);
while let Some(ch) = chars.prev() {
if !fun(ch) {