summaryrefslogtreecommitdiffstats
path: root/sq
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-11-25 13:37:39 +0100
committerNora Widdecke <nora@sequoia-pgp.org>2021-11-29 11:53:55 +0100
commit8a486566e4d2161b2b22c27a98c5bacc349ba3c2 (patch)
treeb9e95299e7bb923d756db53f005f22c125b56b1f /sq
parent4147ebc3ceb6ee955c3ec81c872e33f17c44c9c2 (diff)
sq: Clarify output.
- The empty line is printed as first statement in both branches, so it's unconditional. Make that clear. - Found by clippy::branches_sharing_code
Diffstat (limited to 'sq')
-rw-r--r--sq/src/commands/dump.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/sq/src/commands/dump.rs b/sq/src/commands/dump.rs
index 58401baa..a1ce9c7f 100644
--- a/sq/src/commands/dump.rs
+++ b/sq/src/commands/dump.rs
@@ -723,8 +723,9 @@ impl PacketDumper {
}
}
+ writeln!(output, "{}", i)?;
+
if let Some(map) = map {
- writeln!(output, "{}", i)?;
let mut hd = hex::Dumper::new(output, self.indentation_for_hexdump(
i, map.iter()
.map(|f| if f.name() == "body" { 16 } else { f.name().len() })
@@ -741,8 +742,6 @@ impl PacketDumper {
let output = hd.into_inner();
writeln!(output, "{}", i)?;
- } else {
- writeln!(output, "{}", i)?;
}
Ok(())