From 9d87cddb60e1a0a8697033901fbf7f9f4cc1994a Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Wed, 1 Dec 2021 00:06:39 +0100 Subject: [PATCH] Minor tweaks in Display impl for Algo. --- openpgp-card/src/algorithm.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openpgp-card/src/algorithm.rs b/openpgp-card/src/algorithm.rs index 4284ed1..c087920 100644 --- a/openpgp-card/src/algorithm.rs +++ b/openpgp-card/src/algorithm.rs @@ -165,8 +165,14 @@ impl fmt::Display for Algo { Self::Rsa(rsa) => { write!( f, - "RSA {}, {} [format {}]", - rsa.len_n, rsa.len_e, rsa.import_format + "RSA {} [e {}{}]", + rsa.len_n, + rsa.len_e, + if rsa.import_format != 0 { + format!(", format {}", rsa.import_format) + } else { + "".to_string() + } ) } Self::Ecc(ecc) => {