diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-07 17:52:18 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:59 +0200 |
commit | baecfecbf953aa9e40f16084b927f35b69efc8f0 (patch) | |
tree | bac7c53d32187d6eff22d231dd556b4ada40d50f /sq | |
parent | 4d7ecc72b384a9c30e7024eb2ebfaede9882db06 (diff) |
Lint: Use matches! macro.
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
Diffstat (limited to 'sq')
-rw-r--r-- | sq/src/commands/key.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sq/src/commands/key.rs b/sq/src/commands/key.rs index 9a619ab8..cd3cf4ef 100644 --- a/sq/src/commands/key.rs +++ b/sq/src/commands/key.rs @@ -451,14 +451,14 @@ fn attest_certifications(config: Config, m: &ArgMatches) let input = open_or_stdin(m.value_of("key"))?; let key = Cert::from_reader(input)?; - // First, remove all attestations. - let key = Cert::from_packets( - key.into_packets().filter(|p| match p { - Packet::Signature(s) if s.typ() == SignatureType__AttestedKey => - false, - _ => true, - }))?; + // First, remove all attestations. + let key = Cert::from_packets(key.into_packets().filter(|p| { + !matches!( + p, + Packet::Signature(s) if s.typ() == SignatureType__AttestedKey + ) + }))?; // Get a signer. let mut passwords = Vec::new(); |