diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-19 17:08:05 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-20 18:04:56 +0100 |
commit | e8b55c27a98a332dd69113e3c07e98cbbce8bb7b (patch) | |
tree | 4eae88561988f41545698cc42411454952003970 /openpgp/src/message | |
parent | 56c114e51e6cd74719bdfd90f160eb6220f63ae6 (diff) |
openpgp: Embed struct Container in the container packets.
- This allows us to implement PartialEq and related traits more
selectively. See #93.
Diffstat (limited to 'openpgp/src/message')
-rw-r--r-- | openpgp/src/message/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs index df38cf12..9592a703 100644 --- a/openpgp/src/message/mod.rs +++ b/openpgp/src/message/mod.rs @@ -997,9 +997,9 @@ mod tests { // 1: MDC // => good. let mut seip = SEIP1::new(); - seip.children_mut().unwrap().push( + seip.container_mut().push( lit.clone().into()); - seip.children_mut().unwrap().push( + seip.container_mut().push( MDC::from([0u8; 20]).into()); packets[1] = seip.into(); @@ -1079,7 +1079,7 @@ mod tests { // 2: Literal // => bad. packets.remove(3); - packets[2].children_mut().unwrap().push(lit.clone().into()); + packets[2].container_mut().unwrap().push(lit.clone().into()); assert!(packets.iter().map(|p| p.tag()).collect::<Vec<Tag>>() == [ Tag::SKESK, Tag::SKESK, Tag::SEIP ]); @@ -1093,7 +1093,7 @@ mod tests { // 2: SEIP // 0: Literal // => good. - packets[2].children_mut().unwrap().packets.pop().unwrap(); + packets[2].container_mut().unwrap().packets.pop().unwrap(); #[allow(deprecated)] packets.insert( |