Skip to content

Commit

Permalink
Amend byte_spans_never_crash to include the very last char
Browse files Browse the repository at this point in the history
  • Loading branch information
VonTum authored and zesterer committed Mar 28, 2024
1 parent cbf1271 commit ed66239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,8 @@ mod tests {
fn byte_spans_never_crash() {
let source = "apple\np\n\nempty\n";

for i in 0..source.len() {
for j in i..source.len() {
for i in 0..=source.len() {
for j in i..=source.len() {
let _ = Report::<Range<usize>>::build(ReportKind::Error, (), 0)
.with_config(no_color_and_ascii().with_index_type(IndexType::Byte))
.with_message("Label")
Expand Down

0 comments on commit ed66239

Please sign in to comment.