diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-03-26 14:21:47 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-03-26 15:15:24 +0200 |
commit | 1a70e0e46279e326862da345ef0d0c9f821b707a (patch) | |
tree | 4641676142d70695988e422d06ed912964e957b6 /tool | |
parent | 1ff26b2ded7052d87617ea6f38b727e34e646ee9 (diff) |
tool: Rework indentation.
Diffstat (limited to 'tool')
-rw-r--r-- | tool/src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tool/src/main.rs b/tool/src/main.rs index 32593287..39d501fc 100644 --- a/tool/src/main.rs +++ b/tool/src/main.rs @@ -41,6 +41,10 @@ fn create_or_stdout(f: Option<&str>) -> Result<Box<io::Write>, failure::Error> { } } +// Indent packets according to their recursion level. +const INDENT: &'static str + = " "; + fn real_main() -> Result<(), failure::Error> { let matches = cli::build().get_matches(); @@ -80,9 +84,6 @@ fn real_main() -> Result<(), failure::Error> { input }; - // Indent packets according to their recursion level. - let indent = " "; - let mut ppo = openpgp::parse::PacketParserBuilder::from_reader(input)? .finalize()?; @@ -97,7 +98,7 @@ fn real_main() -> Result<(), failure::Error> { pp.buffer_unread_content()?; } writeln!(output, "{}{:?}", - &indent[0..pp.recursion_depth as usize], pp.packet)?; + &INDENT[0..pp.recursion_depth as usize], pp.packet)?; let (_, _, ppo_tmp, _) = pp.recurse()?; ppo = ppo_tmp; |