From 2cff68449c69ceadce2b4cb27b65850591142bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 20 Sep 2021 22:26:08 -0700 Subject: [PATCH] misc: remove stale comment --- src/source_impls.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/source_impls.rs b/src/source_impls.rs index c1733583..77c41144 100644 --- a/src/source_impls.rs +++ b/src/source_impls.rs @@ -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 {