1
0
mirror of https://github.com/pcvolkmer/cert-tools.git synced 2025-07-01 14:02:54 +00:00

chore: simple code cleanup

This commit is contained in:
2025-04-28 20:45:09 +02:00
parent bc0dc263a3
commit a6f969c8dd

View File

@ -237,10 +237,7 @@ impl Certificate {
#[allow(dead_code)] #[allow(dead_code)]
pub fn to_text(&self) -> Option<String> { pub fn to_text(&self) -> Option<String> {
match self.cert.to_text() { match self.cert.to_text() {
Ok(text) => match String::from_utf8(text) { Ok(text) => String::from_utf8(text).ok(),
Ok(value) => Some(value),
_ => None,
},
_ => None, _ => None,
} }
} }
@ -354,10 +351,7 @@ impl Chain {
return false; return false;
} }
} }
x = match cert.public_key() { x = cert.public_key().ok();
Ok(public_key) => Some(public_key),
Err(()) => None,
}
} }
!time_issue && !self.certs.is_empty() !time_issue && !self.certs.is_empty()
} }