summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet_pile.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-19 17:37:23 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-20 18:04:56 +0100
commitcf103b49bbaf37783e7d761d3eb06366d9692b89 (patch)
treec3506d0b0af91eb0803500c8108dbfe14a6c9e0c /openpgp/src/packet_pile.rs
parentcfdc2c0a51ca5bcb30683d37b3983c6589799a20 (diff)
openpgp: Trim set of container functions and reduce visibility.
Diffstat (limited to 'openpgp/src/packet_pile.rs')
-rw-r--r--openpgp/src/packet_pile.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs
index c3f95625..dff0411b 100644
--- a/openpgp/src/packet_pile.rs
+++ b/openpgp/src/packet_pile.rs
@@ -188,9 +188,10 @@ impl PacketPile {
/// // A compressed data packet that contains a literal data packet.
/// let mut literal = Literal::new(DataFormat::Text);
/// literal.set_body(b"old".to_vec());
- /// let mut pile = PacketPile::from(Packet::from(
- /// CompressedData::new(CompressionAlgorithm::Uncompressed)
- /// .push(literal.into())));
+ /// let mut compressed =
+ /// CompressedData::new(CompressionAlgorithm::Uncompressed);
+ /// compressed.children_mut().push(literal.into());
+ /// let mut pile = PacketPile::from(Packet::from(compressed));
///
/// // Replace the literal data packet.
/// let mut literal = Literal::new(DataFormat::Text);
@@ -627,7 +628,7 @@ mod test {
}
let mut seip = SEIP1::new();
- seip.container_mut().push(cd.into());
+ seip.children_mut().push(cd.into());
packets.push(seip.into());
eprintln!("{:#?}", packets);