chore: make clippy happy

This commit is contained in:
2022-04-10 22:31:35 +08:00
parent be2e014638
commit 3cf62cb687
6 changed files with 14 additions and 14 deletions

View File

@@ -78,8 +78,7 @@ fn print_cert_info(yubikey: &mut YubiKey, slot: SlotId, detail_output: bool) ->
return simple_error!("error reading certificate in slot {:?}: {}", slot, e);
}
};
let buf = cert.as_ref().clone();
let buf = cert.as_ref();
if !buf.is_empty() {
information!("{}", "-".repeat(88));
let certificate_fingerprint_sha256 = Sha256::digest(buf);
@@ -91,7 +90,7 @@ fn print_cert_info(yubikey: &mut YubiKey, slot: SlotId, detail_output: bool) ->
information!("{}", bytes_to_pem("CERTIFICATE", buf));
}
match parse_x509_certificate(&buf) {
match parse_x509_certificate(buf) {
Ok((_rem, cert)) => {
information!("Algorithm: {}", cert.tbs_certificate.subject_pki.algorithm.algorithm);