summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/packet/container.rs1
-rw-r--r--openpgp/src/packet_pile.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/src/packet/container.rs b/openpgp/src/packet/container.rs
index dfbb624b..fd8c0f2f 100644
--- a/openpgp/src/packet/container.rs
+++ b/openpgp/src/packet/container.rs
@@ -435,6 +435,7 @@ impl Packet {
/// Retrieves the packet's unprocessed body.
#[cfg(test)]
+ #[allow(dead_code)] // Not used if no compression feature is enabled.
pub(crate) fn unprocessed_body(&self) -> Option<&[u8]> {
self.container_ref().and_then(|c| match c.body() {
Body::Unprocessed(bytes) => Some(&bytes[..]),
diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs
index 98f70c66..e10795c6 100644
--- a/openpgp/src/packet_pile.rs
+++ b/openpgp/src/packet_pile.rs
@@ -672,7 +672,7 @@ mod test {
use crate::packet::CompressedData;
use crate::packet::seip::SEIP1;
use crate::packet::Tag;
- use crate::parse::{Parse, PacketParser};
+ use crate::parse::Parse;
#[test]
fn deserialize_test_1 () {
@@ -827,6 +827,7 @@ mod test {
#[test]
fn consume_content_1 () {
use std::io::Read;
+ use crate::parse::PacketParser;
// A message containing a compressed packet that contains a
// literal packet. When we read some of the compressed
// packet, we expect recurse() to not recurse.