diff --git a/src/source.rs b/src/source.rs index 43982cb..45db40c 100644 --- a/src/source.rs +++ b/src/source.rs @@ -156,7 +156,7 @@ impl> Source { .lines .binary_search_by_key(&offset, |line| line.offset) .unwrap_or_else(|idx| idx.saturating_sub(1)); - let line = self.lines[idx]; + let line = self.line(idx)?; assert!( offset >= line.offset, "offset = {}, line.offset = {}",