Skip to content

Commit

Permalink
refactor: clippy::else_if_without_else (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo authored and joshka committed Mar 4, 2024
1 parent fdb14dc commit bbb6d65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions src/widgets/reflow.rs
Expand Up @@ -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);
}
Expand Down

0 comments on commit bbb6d65

Please sign in to comment.