mirror of https://github.com/zkat/miette.git
misc: remove stale comment
This commit is contained in:
parent
1a0f359e3c
commit
2cff68449c
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue