diff --git a/Cargo.toml b/Cargo.toml index 965e218b..9b593cdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/widgets/reflow.rs b/src/widgets/reflow.rs index e15e1f5d..a175022a 100644 --- a/src/widgets/reflow.rs +++ b/src/widgets/reflow.rs @@ -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); }