diff options
author | Neal H. Walfield <neal@pep.foundation> | 2022-10-31 13:20:26 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2022-10-31 14:03:01 +0100 |
commit | 59b6c8b04f45403a0a723511a2766e064e40f072 (patch) | |
tree | 208eff7e5646d339a403a8200cbf38eab95ff5bd | |
parent | 3f367e8a303646704976ed212254ec5b91c7cff1 (diff) |
openpgp: Synchronize AsymmetricAlgorithm's derives.
- `HashAlgorithm`, `SubpacketTag`, `SymmetricAlgorithm`,
`AEADAlgorithm`, and `packet::Tag` implement `PartialEq`, `Eq`, and
`Copy`. Change `AsymmetricAlgorithm` to also implement those
traits.
- In addition to the aesthetic motivation, having the same interface
simplifies using all of these types with the same macro.
-rw-r--r-- | openpgp/NEWS | 3 | ||||
-rw-r--r-- | openpgp/src/policy.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/openpgp/NEWS b/openpgp/NEWS index 53b443b3..9b1cf413 100644 --- a/openpgp/NEWS +++ b/openpgp/NEWS @@ -2,6 +2,9 @@ #+TITLE: sequoia-openpgp NEWS – history of user-visible changes #+STARTUP: content hidestars +* Changes in 1.11.0 + * New functionality + - AsymmetricAlgorithm implements PartialEq, Eq, and Copy. * Changes in 1.10.0 ** New functionality - Cert::insert_packets2 diff --git a/openpgp/src/policy.rs b/openpgp/src/policy.rs index 7ba1272c..879f3947 100644 --- a/openpgp/src/policy.rs +++ b/openpgp/src/policy.rs @@ -1514,7 +1514,7 @@ impl<'a> Policy for StandardPolicy<'a> { /// Note: This enum cannot be exhaustively matched to allow future /// extensions. #[non_exhaustive] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq, Eq, Copy)] pub enum AsymmetricAlgorithm { /// RSA with key sizes up to 2048-1 bit. RSA1024, |