Skip to content

Commit ed66239

Browse files
VonTumzesterer
authored andcommitted
Amend byte_spans_never_crash to include the very last char
1 parent cbf1271 commit ed66239

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,8 @@ mod tests {
10121012
fn byte_spans_never_crash() {
10131013
let source = "apple\np\n\nempty\n";
10141014

1015-
for i in 0..source.len() {
1016-
for j in i..source.len() {
1015+
for i in 0..=source.len() {
1016+
for j in i..=source.len() {
10171017
let _ = Report::<Range<usize>>::build(ReportKind::Error, (), 0)
10181018
.with_config(no_color_and_ascii().with_index_type(IndexType::Byte))
10191019
.with_message("Label")

0 commit comments

Comments
 (0)