From 07ee6ebf5630382bf61fd2122b81a66acd50d708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 18 Jun 2021 14:47:26 +0300 Subject: Fix line numbering in tidy --- xtask/src/tidy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs index 06219d155..a9d434e20 100644 --- a/xtask/src/tidy.rs +++ b/xtask/src/tidy.rs @@ -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) } } } -- cgit v1.2.3