Skip to content

Commit 402a00a

Browse files
committed
clippy: fix or-pattern in let binding
1 parent e64138c commit 402a00a

File tree

1 file changed

+3
-1
lines changed
  • src/tools/clippy/clippy_lints/src

1 file changed

+3
-1
lines changed

src/tools/clippy/clippy_lints/src/loops.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,9 @@ struct MinifyingSugg<'a>(Sugg<'a>);
885885

886886
impl<'a> MinifyingSugg<'a> {
887887
fn as_str(&self) -> &str {
888-
let Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) = &self.0;
888+
let s = match &self.0 {
889+
Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) => s,
890+
};
889891
s.as_ref()
890892
}
891893

0 commit comments

Comments
 (0)