refactor: clippy::else_if_without_else (#974)

This commit is contained in:
EdJoPaTo 2024-03-03 13:35:16 +01:00 committed by Josh McKinney
parent fdb14dc7cd
commit bbb6d65e06
No known key found for this signature in database
GPG key ID: 722287396A903BC5
2 changed files with 4 additions and 0 deletions

View file

@ -77,6 +77,7 @@ wildcard_imports = "allow"
# nursery or restricted
deref_by_slicing = "warn"
else_if_without_else = "warn"
empty_line_after_doc_comments = "warn"
equatable_if_let = "warn"
missing_const_for_fn = "warn"

View file

@ -189,6 +189,9 @@ where
wrapped_lines.push(vec![]);
} else if !self.trim || !current_line.is_empty() {
current_line.extend(unfinished_whitespaces.into_iter());
} else {
// TODO: explain why this else branch is ok.
// See clippy::else_if_without_else
}
current_line.append(&mut unfinished_word);
}