summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse/packet_pile_parser.rs
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2018-10-08 22:23:18 +0200
committerNeal H. Walfield <neal@pep.foundation>2018-10-09 09:38:30 +0200
commit482f166f799d15601c5739593189b397f20abccd (patch)
tree41ffdb03f17f30182f5110f525d20ed1a325544e /openpgp/src/parse/packet_pile_parser.rs
parentdb3f4d052592249fb4b055bcd669b30d876de3d6 (diff)
openpgp: Drop redundant recursive_depth field.
- The packet parser's recursive depth can be computed from the path, which we now track. As such, don't track the recursive depth separately, just derive it from the path.
Diffstat (limited to 'openpgp/src/parse/packet_pile_parser.rs')
-rw-r--r--openpgp/src/parse/packet_pile_parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/parse/packet_pile_parser.rs b/openpgp/src/parse/packet_pile_parser.rs
index fb0faf9c..28f4ba94 100644
--- a/openpgp/src/parse/packet_pile_parser.rs
+++ b/openpgp/src/parse/packet_pile_parser.rs
@@ -256,7 +256,7 @@ impl<'a> PacketPileParser<'a> {
/// top-level container have a recursion depth of 1. Etc.
pub fn recursion_depth(&self) -> Option<u8> {
if let PacketParserResult::Some(ref pp) = self.ppr {
- Some(pp.recursion_depth)
+ Some(pp.recursion_depth() as u8)
} else {
None
}