diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-04-09 17:29:50 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-04-09 18:18:18 +0200 |
commit | c1516c59709fa47d13100daddb57657008a793c3 (patch) | |
tree | 25a93149cd56546cdff6b383288cffc0b82941a1 /tool/src/commands | |
parent | dbaf698a597a018d9522e8025e9b56e784f0d60b (diff) |
openpgp: Remove convenience functions.
Diffstat (limited to 'tool/src/commands')
-rw-r--r-- | tool/src/commands/dump.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/mod.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs index 7f0cc350..53c84fd6 100644 --- a/tool/src/commands/dump.rs +++ b/tool/src/commands/dump.rs @@ -137,9 +137,9 @@ pub fn dump<W>(input: &mut dyn io::Read, output: &mut dyn io::Write, let header = pp.header().clone(); let map = pp.take_map(); + let recursion_depth = pp.recursion_depth(); let (packet, ppr_) = pp.recurse()?; ppr = ppr_; - let recursion_depth = ppr.last_recursion_depth().unwrap(); dumper.packet(output, recursion_depth as usize, header, packet, map, additional_fields)?; diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index ace0ad8d..fa8ed857 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -443,9 +443,9 @@ pub fn split(input: &mut dyn io::Read, prefix: &str) } } + let old_depth = Some(pp.recursion_depth()); ppr = pp.recurse()?.1; - let old_depth = ppr.last_recursion_depth(); - let new_depth = ppr.recursion_depth(); + let new_depth = ppr.as_ref().map(|pp| pp.recursion_depth()); // Update pos. match old_depth.cmp(&new_depth) { |