summaryrefslogtreecommitdiffstats
path: root/openpgp/src/keyhandle.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-09-25 15:21:05 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-09-25 15:21:05 +0200
commit66e290c2e9550c6cd02efe895fb5e0b0220444d9 (patch)
treee8c1df362886c170f12e9776e64677eaee586afb /openpgp/src/keyhandle.rs
parent7b90b8b0dbefb8c98c3eeec709a3899ed41b1089 (diff)
openpgp: Either derive both Eq and Hash, or impl both.
- crypto::mpi::SecretKeyMaterial is the sole exception to this rule, because we are trying to compare them in constant time. Add a hint for clippy that this is okay. - KeyHandle no longer implements Eq, so there is no point in implementing Hash. Simply remove it. - Implement Hash for SubpacketLength by hashing the serialized form. Manually implement Eq for consistency. - Fixes #567.
Diffstat (limited to 'openpgp/src/keyhandle.rs')
-rw-r--r--openpgp/src/keyhandle.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/keyhandle.rs b/openpgp/src/keyhandle.rs
index c9b613c1..e92efd05 100644
--- a/openpgp/src/keyhandle.rs
+++ b/openpgp/src/keyhandle.rs
@@ -13,7 +13,7 @@ use crate::{
/// Identifies certificates and keys.
///
/// A `KeyHandle` is either a `Fingerprint` or a `KeyID`.
-#[derive(Debug, Clone, Hash)]
+#[derive(Debug, Clone)]
pub enum KeyHandle {
/// A Fingerprint.
Fingerprint(Fingerprint),