diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-03-13 15:45:32 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-03-13 16:41:26 +0100 |
commit | bfeda8e25b13a4221d63a0b9978ef55a77cd33f5 (patch) | |
tree | fc0f3dbee2fefc47df4abab50356380d961f0cea /openpgp/src/parse | |
parent | f9aa80d1adb056091e4d12d8d042b54750348d61 (diff) |
openpgp: Decouple PacketPile and Container.
- Likewise for the test.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/packet_pile_parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/parse/packet_pile_parser.rs b/openpgp/src/parse/packet_pile_parser.rs index 8c6512a2..83fff632 100644 --- a/openpgp/src/parse/packet_pile_parser.rs +++ b/openpgp/src/parse/packet_pile_parser.rs @@ -131,8 +131,8 @@ impl<'a> PacketPileParser<'a> { for i in 0..position { // The most recent child. let tmp = container; - let packets_len = tmp.packets.len(); - let p = &mut tmp.packets[packets_len - 1]; + let packets_len = tmp.children_ref().len(); + let p = &mut tmp.children_mut()[packets_len - 1]; if p.children().next().is_none() { assert!(i == position - 1, "Internal inconsistency while building message."); @@ -141,7 +141,7 @@ impl<'a> PacketPileParser<'a> { container = p.container_mut().unwrap(); } - container.packets.push(packet); + container.children_mut().push(packet); } /// Finishes parsing the current packet and starts parsing the |