aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/movement.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-01 19:55:18 +0000
committerNathan Vegdahl2021-07-02 02:06:52 +0000
commit220bc85821d87f65630601dedd219fd2fa41c0ea (patch)
tree6500a0853a2ac7e95df0123e01f4f8ac582f2949 /helix-core/src/movement.rs
parentb571f28641787ae4c5750e91899afdccc6d89ed6 (diff)
Fix all remaining warnings in helix-core except for two.
I'm not sure how to address them, because they look like they might be bugs, and code is involved. Will poke the relevant people.
Diffstat (limited to 'helix-core/src/movement.rs')
-rw-r--r--helix-core/src/movement.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs
index 85c0e749..acc95e7e 100644
--- a/helix-core/src/movement.rs
+++ b/helix-core/src/movement.rs
@@ -113,7 +113,7 @@ pub fn move_prev_long_word_start(slice: RopeSlice, range: Range, count: usize) -
word_move(slice, range, count, WordMotionTarget::PrevLongWordStart)
}
-fn word_move(slice: RopeSlice, mut range: Range, count: usize, target: WordMotionTarget) -> Range {
+fn word_move(slice: RopeSlice, range: Range, count: usize, target: WordMotionTarget) -> Range {
(0..count).fold(range, |range, _| {
slice.chars_at(range.head).range_to_target(target, range)
})
@@ -179,7 +179,6 @@ enum WordMotionPhase {
impl CharHelpers for Chars<'_> {
fn range_to_target(&mut self, target: WordMotionTarget, origin: Range) -> Range {
- let range = origin;
// Characters are iterated forward or backwards depending on the motion direction.
let characters: Box<dyn Iterator<Item = char>> = match target {
WordMotionTarget::PrevWordStart | WordMotionTarget::PrevLongWordStart => {