From 89337646884b59c894329432eea960be4b3e335e Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 26 Mar 2020 17:21:32 +0100 Subject: openpgp: Change packet bodies to be tristate. - Packet bodies can now be either unprocessed (e.g. compressed, encrypted), processed (e.g. uncompressed, decrypted), or structured (e.g. parsed into packets). - Make the container types deref to Container, and container deref to packet bodies. - This cleanly avoids the confusion when serializing containers: We can serialize compressed data packets with either body, but we can only serialize encryption containers with unprocessed bodies. - Fixes #187. --- openpgp/src/packet/unknown.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openpgp/src/packet/unknown.rs') diff --git a/openpgp/src/packet/unknown.rs b/openpgp/src/packet/unknown.rs index d407200d..cca58226 100644 --- a/openpgp/src/packet/unknown.rs +++ b/openpgp/src/packet/unknown.rs @@ -62,7 +62,7 @@ impl Unknown { common: Default::default(), tag: tag, error: error, - container: Default::default(), + container: packet::Container::default_unprocessed(), } } -- cgit v1.2.3