Skip to content

Commit

Permalink
misc: remove stale comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Sep 22, 2021
1 parent 1a0f359 commit 2cff684
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/source_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ fn context_info<'a>(
offset += 1;
}

// These lines are commented as a hat-tip towards better failures. For the
// case of error reporting _specifically_, exposing a bug in your own
// error span calculation code by crashing with an opaque fmt::Error is
// not ideal. Instead, we go ahead and return what we've collected so far
// in out-of-range cases and just let it render without or with a missing
// label.
//
// Old code is left here in case we change our minds and we want to bring back more strict calculation.

if offset >= (span.offset() + span.len()).saturating_sub(1) {
let starting_offset = before_lines_starts.get(0).copied().unwrap_or_else(|| {
if line_count > 0 {
Expand Down

0 comments on commit 2cff684

Please sign in to comment.