Don't assume errors appear in-order with line contents

This commit is contained in:
Charlie Marsh 2022-08-31 08:40:38 -04:00
parent 9e3c35e6dc
commit 80f3cd0ef7
1 changed files with 2 additions and 1 deletions

View File

@ -31,8 +31,9 @@ pub fn check_lines(checks: &mut Vec<Check>, contents: &str, settings: &Settings)
} }
} }
} }
ignored.sort();
for index in ignored.iter().rev() { for index in ignored.iter().rev() {
checks.remove(*index); checks.swap_remove(*index);
} }
checks.extend(line_checks); checks.extend(line_checks);
} }