mirror of
https://github.com/ratatui-org/ratatui
synced 2024-09-20 06:31:59 +00:00
refactor: clippy::else_if_without_else (#974)
This commit is contained in:
parent
fdb14dc7cd
commit
bbb6d65e06
2 changed files with 4 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue