refactor: change error message formatting

This commit is contained in:
Tobias Schmitz 2025-06-10 13:07:43 +02:00
parent 0ed6b31b70
commit 788106005f
No known key found for this signature in database

View File

@ -418,7 +418,10 @@ impl<'a> Parser<'a> {
}; };
let start = self.parse_line_col()?; let start = self.parse_line_col()?;
let lines = Lines::try_from(&bytes).expect("Errors shouldn't be annotated for files that aren't human readable (not valid utf-8)"); let lines = Lines::try_from(&bytes).expect(
"errors shouldn't be annotated for files \
that aren't human readable (not valid utf-8)",
);
let range = if self.s.eat_if('-') { let range = if self.s.eat_if('-') {
let (line, col) = start; let (line, col) = start;
let start = lines.line_column_to_byte(line, col); let start = lines.line_column_to_byte(line, col);