apply clippy 1.68 suggestions

* Simplify &(ref foo, _) tuple pattern matches
* Drop unneccessary .clone() calls
* Replace .position(cond).is_some() by .any(cond)
* Drop unneccessary lifetime specs
This commit is contained in:
Mira Ressel
2023-04-11 14:37:30 +02:00
parent 64660ee8d2
commit 0e9b0a6421
7 changed files with 17 additions and 21 deletions
@@ -62,7 +62,7 @@ fn visit_and_remove_block_entry(
};
overlayed_db.delete_block_entry(&block_hash);
for &(_, ref candidate_hash) in block_entry.candidates() {
for (_, candidate_hash) in block_entry.candidates() {
let candidate = match visited_candidates.entry(*candidate_hash) {
Entry::Occupied(e) => e.into_mut(),
Entry::Vacant(e) => {
@@ -227,7 +227,7 @@ pub fn add_block_entry(
// read and write all updated entries.
{
for &(_, ref candidate_hash) in entry.candidates() {
for (_, candidate_hash) in entry.candidates() {
let NewCandidateInfo { candidate, backing_group, our_assignment } =
match candidate_info(candidate_hash) {
None => return Ok(Vec::new()),