aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/movement.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-01 19:24:22 +0000
committerNathan Vegdahl2021-07-02 02:06:52 +0000
commitb571f28641787ae4c5750e91899afdccc6d89ed6 (patch)
treea35b5fc93715965d1407c87c2cd592ade579bee2 /helix-core/src/movement.rs
parent0b2d51cf5a840b6e34d360b34c116bb981b5058e (diff)
Remove #[allow(unused)] from helix-core, and fix unused imports.
Still a bunch more warnings to fix in core, but it's a start.
Diffstat (limited to 'helix-core/src/movement.rs')
-rw-r--r--helix-core/src/movement.rs23
1 files changed, 10 insertions, 13 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs
index a4c7f9c9..85c0e749 100644
--- a/helix-core/src/movement.rs
+++ b/helix-core/src/movement.rs
@@ -1,12 +1,9 @@
-use std::iter::{self, from_fn, Peekable, SkipWhile};
+use std::iter::{self, from_fn};
use ropey::iter::Chars;
use crate::{
- chars::{
- categorize_char, char_is_line_ending, char_is_punctuation, char_is_whitespace,
- char_is_word, CharCategory,
- },
+ chars::{categorize_char, char_is_line_ending, CharCategory},
coords_at_pos,
graphemes::{nth_next_grapheme_boundary, nth_prev_grapheme_boundary},
line_ending::{get_line_ending, line_end_char_index},
@@ -270,20 +267,20 @@ fn reached_target(target: WordMotionTarget, peek: char, next_peek: Option<&char>
match target {
WordMotionTarget::NextWordStart => {
- (is_word_boundary(peek, *next_peek)
- && (char_is_line_ending(*next_peek) || !next_peek.is_whitespace()))
+ is_word_boundary(peek, *next_peek)
+ && (char_is_line_ending(*next_peek) || !next_peek.is_whitespace())
}
WordMotionTarget::NextWordEnd | WordMotionTarget::PrevWordStart => {
- (is_word_boundary(peek, *next_peek)
- && (!peek.is_whitespace() || char_is_line_ending(*next_peek)))
+ is_word_boundary(peek, *next_peek)
+ && (!peek.is_whitespace() || char_is_line_ending(*next_peek))
}
WordMotionTarget::NextLongWordStart => {
- (is_long_word_boundary(peek, *next_peek)
- && (char_is_line_ending(*next_peek) || !next_peek.is_whitespace()))
+ is_long_word_boundary(peek, *next_peek)
+ && (char_is_line_ending(*next_peek) || !next_peek.is_whitespace())
}
WordMotionTarget::NextLongWordEnd | WordMotionTarget::PrevLongWordStart => {
- (is_long_word_boundary(peek, *next_peek)
- && (!peek.is_whitespace() || char_is_line_ending(*next_peek)))
+ is_long_word_boundary(peek, *next_peek)
+ && (!peek.is_whitespace() || char_is_line_ending(*next_peek))
}
}
}