mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
clippy: fix or-pattern in let binding
This commit is contained in:
parent
b303f7d6f9
commit
7e4f5ca38e
1 changed files with 3 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue