Skip to content

Commit

Permalink
lint: clippy::range_plus_one lint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo authored and BurntSushi committed Nov 13, 2024
1 parent ef95d88 commit c7f3d56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ext_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3744,7 +3744,7 @@ impl<'a> Iterator for LinesWithTerminator<'a> {
Some(line)
}
Some(end) => {
let line = &self.bytes[..end + 1];
let line = &self.bytes[..=end];
self.bytes = &self.bytes[end + 1..];
Some(line)
}
Expand All @@ -3764,7 +3764,7 @@ impl<'a> DoubleEndedIterator for LinesWithTerminator<'a> {
}
Some(end) => {
let line = &self.bytes[end + 1..];
self.bytes = &self.bytes[..end + 1];
self.bytes = &self.bytes[..=end];
Some(line)
}
}
Expand Down

0 comments on commit c7f3d56

Please sign in to comment.