Skip to content

Commit 931253d

Browse files
committed
Make single_match clippy happy
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
1 parent 911a4f3 commit 931253d

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/dist/signatures.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,13 @@ impl VerificationHelper for Helper<'_> {
5656
for layer in structure.into_iter() {
5757
match layer {
5858
MessageLayer::SignatureGroup { results } => {
59-
for result in results {
60-
match result {
61-
Ok(GoodChecksum { ka, .. }) => {
62-
// A good signature! Find the index
63-
// of the singer key and return
64-
// success.
65-
self.index = self.certs.iter().position(|c| c.cert() == ka.cert());
66-
assert!(self.index.is_some());
67-
return Ok(());
68-
}
69-
_ => {
70-
// We ignore any errors.
71-
}
72-
}
59+
// We ignore any errors for now.
60+
for GoodChecksum { ka, .. } in results.into_iter().flatten() {
61+
// A good signature! Find the index
62+
// of the signer key and return
63+
// success.
64+
self.index = self.certs.iter().position(|c| c.cert() == ka.cert());
65+
assert!(self.index.is_some());
7366
}
7467
}
7568
MessageLayer::Compression { .. } => {

0 commit comments

Comments
 (0)