diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-09-02 12:06:36 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-09-02 13:32:02 +0200 |
commit | 3c1325b8fad753b2006c215535c6d0b162c62166 (patch) | |
tree | df561e04be11cc47a958641d1c514b9468ff950e | |
parent | 3f94eb91b87a3cd5034ae26f4f7e773e67af3d6e (diff) |
openpgp: When comparing Unknowns, only compare their values
- Ignore the common bits when comparing two Unknowns for equality;
just consider their bodies.
-rw-r--r-- | openpgp/src/packet/unknown.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/src/packet/unknown.rs b/openpgp/src/packet/unknown.rs index 8258badd..44e1b334 100644 --- a/openpgp/src/packet/unknown.rs +++ b/openpgp/src/packet/unknown.rs @@ -25,7 +25,9 @@ impl Eq for Unknown {} impl PartialEq for Unknown { fn eq(&self, other: &Unknown) -> bool { - self.common == other.common && self.tag == other.tag + assert!(self.common.children.is_none()); + assert!(other.common.children.is_none()); + self.common.body == other.common.body && self.tag == other.tag } } |