Skip to content

Commit c7f3d56

Browse files
lopopoloBurntSushi
authored andcommitted
lint: clippy::range_plus_one lint violations
1 parent ef95d88 commit c7f3d56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ext_slice.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3744,7 +3744,7 @@ impl<'a> Iterator for LinesWithTerminator<'a> {
37443744
Some(line)
37453745
}
37463746
Some(end) => {
3747-
let line = &self.bytes[..end + 1];
3747+
let line = &self.bytes[..=end];
37483748
self.bytes = &self.bytes[end + 1..];
37493749
Some(line)
37503750
}
@@ -3764,7 +3764,7 @@ impl<'a> DoubleEndedIterator for LinesWithTerminator<'a> {
37643764
}
37653765
Some(end) => {
37663766
let line = &self.bytes[end + 1..];
3767-
self.bytes = &self.bytes[..end + 1];
3767+
self.bytes = &self.bytes[..=end];
37683768
Some(line)
37693769
}
37703770
}

0 commit comments

Comments
 (0)