Minor tweaks in Display impl for Algo.

This commit is contained in:
Heiko Schaefer 2021-12-01 00:06:39 +01:00
parent c4fcafc25b
commit 9d87cddb60
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -165,8 +165,14 @@ impl fmt::Display for Algo {
Self::Rsa(rsa) => { Self::Rsa(rsa) => {
write!( write!(
f, f,
"RSA {}, {} [format {}]", "RSA {} [e {}{}]",
rsa.len_n, rsa.len_e, rsa.import_format rsa.len_n,
rsa.len_e,
if rsa.import_format != 0 {
format!(", format {}", rsa.import_format)
} else {
"".to_string()
}
) )
} }
Self::Ecc(ecc) => { Self::Ecc(ecc) => {