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 /openpgp/src/policy.rs | |
parent | 4d7ecc72b384a9c30e7024eb2ebfaede9882db06 (diff) |
Lint: Use matches! macro.
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
Diffstat (limited to 'openpgp/src/policy.rs')
-rw-r--r-- | openpgp/src/policy.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/openpgp/src/policy.rs b/openpgp/src/policy.rs index c915d06d..ee006161 100644 --- a/openpgp/src/policy.rs +++ b/openpgp/src/policy.rs @@ -1292,12 +1292,9 @@ impl<'a> Policy for StandardPolicy<'a> { fn signature(&self, sig: &Signature, sec: HashAlgoSecurity) -> Result<()> { let time = self.time.unwrap_or_else(Timestamp::now); - let rev = match sig.typ() { - SignatureType::KeyRevocation + let rev = matches!(sig.typ(), SignatureType::KeyRevocation | SignatureType::SubkeyRevocation - | SignatureType::CertificationRevocation => true, - _ => false, - }; + | SignatureType::CertificationRevocation); // Note: collision resistance requires 2nd pre-image resistance. if sec == HashAlgoSecurity::CollisionResistance { |