diff options
| author | est31 <MTest31@outlook.com> | 2022-10-10 22:37:42 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-10-11 00:12:16 +0200 |
| commit | f48d13f8d1b442c38755cfe87c28f56e1dca10cc (patch) | |
| tree | f21a120086292776b215372660c543d6ae90e325 /clippy_dev/src/update_lints.rs | |
| parent | cf72565a12c982f577ca4394c3b80edb89f6c6d3 (diff) | |
| download | rust-f48d13f8d1b442c38755cfe87c28f56e1dca10cc.tar.gz rust-f48d13f8d1b442c38755cfe87c28f56e1dca10cc.zip | |
Replace manual let else patterns with let else
Diffstat (limited to 'clippy_dev/src/update_lints.rs')
| -rw-r--r-- | clippy_dev/src/update_lints.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clippy_dev/src/update_lints.rs b/clippy_dev/src/update_lints.rs index 8d1bfacd1dc..e690bc369cd 100644 --- a/clippy_dev/src/update_lints.rs +++ b/clippy_dev/src/update_lints.rs @@ -869,13 +869,11 @@ fn clippy_lints_src_files() -> impl Iterator<Item = (PathBuf, DirEntry)> { macro_rules! match_tokens { ($iter:ident, $($token:ident $({$($fields:tt)*})? $(($capture:ident))?)*) => { { - $($(let $capture =)? if let Some(LintDeclSearchResult { + $(#[allow(clippy::redundant_pattern)] let Some(LintDeclSearchResult { token_kind: TokenKind::$token $({$($fields)*})?, - content: _x, + content: $($capture @)? _, .. - }) = $iter.next() { - _x - } else { + }) = $iter.next() else { continue; };)* #[allow(clippy::unused_unit)] |
