Fix line numbering in tidy

This commit is contained in:
Laurențiu Nicola 2021-06-18 14:47:26 +03:00
parent 0d863ccea9
commit 07ee6ebf56

View File

@ -371,7 +371,7 @@ fn check_trailing_ws(path: &Path, text: &str) {
}
for (line_number, line) in text.lines().enumerate() {
if line.chars().last().map(char::is_whitespace) == Some(true) {
panic!("Trailing whitespace in {} at line {}", path.display(), line_number)
panic!("Trailing whitespace in {} at line {}", path.display(), line_number + 1)
}
}
}