Skip to content

Commit

Permalink
clippy: fix or-pattern in let binding
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed Mar 8, 2021
1 parent e64138c commit 402a00a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tools/clippy/clippy_lints/src/loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,9 @@ struct MinifyingSugg<'a>(Sugg<'a>);

impl<'a> MinifyingSugg<'a> {
fn as_str(&self) -> &str {
let Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) = &self.0;
let s = match &self.0 {
Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) => s,
};
s.as_ref()
}

Expand Down

0 comments on commit 402a00a

Please sign in to comment.