diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-01-03 17:41:02 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-01-08 12:03:40 +0100 |
commit | 3218b24f3537f872f79081d01c0ad5e2f6871195 (patch) | |
tree | e0cac4ec3fb254de88fc2564555f261321397842 /openpgp/src/packet/unknown.rs | |
parent | 245fa8ddb2d3ac2fa03cd67434c0f61349c64ce2 (diff) |
openpgp: Explicitly implement PartialEq, Hash for packets.
- We explicitly exclude the common fields.
- See #92.
Diffstat (limited to 'openpgp/src/packet/unknown.rs')
-rw-r--r-- | openpgp/src/packet/unknown.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/openpgp/src/packet/unknown.rs b/openpgp/src/packet/unknown.rs index 6f482c12..0b5ddf61 100644 --- a/openpgp/src/packet/unknown.rs +++ b/openpgp/src/packet/unknown.rs @@ -31,8 +31,7 @@ pub struct Unknown { impl PartialEq for Unknown { fn eq(&self, other: &Unknown) -> bool { - self.common == other.common - && self.tag == other.tag + self.tag == other.tag && self.container == other.container } } @@ -41,7 +40,6 @@ impl Eq for Unknown { } impl Hash for Unknown { fn hash<H: Hasher>(&self, state: &mut H) { - self.common.hash(state); self.tag.hash(state); self.container.hash(state); } |