diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-20 17:59:13 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-20 18:21:04 +0100 |
commit | d806e87242c95e0a282a437279d8bf87b4898bcd (patch) | |
tree | 7af830116ffae2a121aee7a54f123d5d4dd45026 /openpgp/src/lib.rs | |
parent | a6c0f21dc6023492bc7122465e11dc935e622ac6 (diff) |
openpgp: Fix comparing streamed containers.
- Compute a digest over the streamed data and use it to implement
equality.
- Fixes #93.
Diffstat (limited to 'openpgp/src/lib.rs')
-rw-r--r-- | openpgp/src/lib.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs index 3bca389f..f503f77f 100644 --- a/openpgp/src/lib.rs +++ b/openpgp/src/lib.rs @@ -285,19 +285,8 @@ pub enum Error { /// than a `CompressedData` packet. /// /// [Section 5 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5 -/// -/// # A note on partial equality -/// -/// Container packets, like the [`CompressedData`] and the [`SEIP`] -/// packet, can be streamed. If a packet is streamed, we no longer -/// have access to the content, and therefore cannot compare it to -/// other packets. Consequently, a streamed packet is not considered -/// equal to any other packet. -/// -/// [`CompressedData`]: packet/struct.CompressedData.html -/// [`SEIP`]: packet/enum.SEIP.html #[derive(Debug)] -#[derive(PartialEq, Hash, Clone)] +#[derive(PartialEq, Eq, Hash, Clone)] pub enum Packet { /// Unknown packet. Unknown(packet::Unknown), |