diff options
Diffstat (limited to 'openpgp/examples/statistics.rs')
-rw-r--r-- | openpgp/examples/statistics.rs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/openpgp/examples/statistics.rs b/openpgp/examples/statistics.rs index c1c3c33a..c5749621 100644 --- a/openpgp/examples/statistics.rs +++ b/openpgp/examples/statistics.rs @@ -155,19 +155,21 @@ fn main() { tags_size_bytes[t]); } } - println!(); - println!("# Signature statistics"); - println!(); - println!("{:>22} {:>9}", - "", "count",); - println!("--------------------------------"); - for t in 0..256 { - let max = tpk_max.sigs[t]; - if max > 0 { - println!("{:>22} {:>9}", - format!("{:?}", SignatureType::from(t as u8)), - sigs_count[t]); + if tags_count[u8::from(Tag::Signature) as usize] > 0 { + println!(); + println!("# Signature statistics"); + println!(); + println!("{:>22} {:>9}", + "", "count",); + println!("--------------------------------"); + for t in 0..256 { + let max = tpk_max.sigs[t]; + if max > 0 { + println!("{:>22} {:>9}", + format!("{:?}", SignatureType::from(t as u8)), + sigs_count[t]); + } } } |