diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-29 15:17:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-29 15:17:11 +0100 |
| commit | 8d820c0c47ed2be6897859c4eeb7679e4c083ac4 (patch) | |
| tree | 7e52fe5b849c58e8cd3b02feb3586f25097fec77 /compiler/rustc_mir_build/src/build | |
| parent | a18da0088e8f1dbefd55e8974d8eae45c8bce80d (diff) | |
| parent | 8245718503f24a0a316c6603195b94be23f4fda4 (diff) | |
| download | rust-8d820c0c47ed2be6897859c4eeb7679e4c083ac4.tar.gz rust-8d820c0c47ed2be6897859c4eeb7679e4c083ac4.zip | |
Rollup merge of #123188 - klensy:clippy-me2, r=Nilstrieb
compiler: fix few unused_peekable and needless_pass_by_ref_mut clippy lints This fixes few instances of `unused_peekable` and `needless_pass_by_ref_mut`. While i expected to fix more warnings, `needless_pass_by_ref_mut` produced too much for one PR, so i stopped here. Better reviewed commit by commit, as fixes splitted by chunks.
Diffstat (limited to 'compiler/rustc_mir_build/src/build')
| -rw-r--r-- | compiler/rustc_mir_build/src/build/matches/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/build/matches/mod.rs b/compiler/rustc_mir_build/src/build/matches/mod.rs index b4c98834d0a..f8aaf629131 100644 --- a/compiler/rustc_mir_build/src/build/matches/mod.rs +++ b/compiler/rustc_mir_build/src/build/matches/mod.rs @@ -1593,10 +1593,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { /// [`Switch`]: TestKind::Switch /// [`SwitchInt`]: TestKind::SwitchInt /// [`Range`]: TestKind::Range - fn pick_test( - &mut self, - candidates: &mut [&mut Candidate<'_, 'tcx>], - ) -> (Place<'tcx>, Test<'tcx>) { + fn pick_test(&mut self, candidates: &[&mut Candidate<'_, 'tcx>]) -> (Place<'tcx>, Test<'tcx>) { // Extract the match-pair from the highest priority candidate let match_pair = &candidates.first().unwrap().match_pairs[0]; let test = self.test(match_pair); |
