From bfeda8e25b13a4221d63a0b9978ef55a77cd33f5 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 13 Mar 2020 15:45:32 +0100 Subject: openpgp: Decouple PacketPile and Container. - Likewise for the test. --- openpgp/src/parse/packet_pile_parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openpgp/src/parse/packet_pile_parser.rs') 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 -- cgit v1.2.3