chore: Another round of style lints fixes (#17519)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-07 02:36:55 +02:00 committed by GitHub
parent cfd43572c1
commit 095a08d9c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 67 additions and 82 deletions

View file

@ -4301,7 +4301,7 @@ pub fn trailing_whitespace_ranges(rope: &Rope) -> Vec<Range<usize>> {
let mut prev_line_trailing_whitespace_range = 0..0;
for (i, line) in chunk.split('\n').enumerate() {
let line_end_offset = offset + line.len();
let trimmed_line_len = line.trim_end_matches(|c| matches!(c, ' ' | '\t')).len();
let trimmed_line_len = line.trim_end_matches([' ', '\t']).len();
let mut trailing_whitespace_range = (offset + trimmed_line_len)..line_end_offset;
if i == 0 && trimmed_line_len == 0 {