1
0
mirror of https://github.com/pcvolkmer/cert-tools.git synced 2025-07-01 22:12:55 +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)]
pub fn to_text(&self) -> Option<String> {
match self.cert.to_text() {
Ok(text) => match String::from_utf8(text) {
Ok(value) => Some(value),
_ => None,
},
Ok(text) => String::from_utf8(text).ok(),
_ => None,
}
}
@ -354,10 +351,7 @@ impl Chain {
return false;
}
}
x = match cert.public_key() {
Ok(public_key) => Some(public_key),
Err(()) => None,
}
x = cert.public_key().ok();
}
!time_issue && !self.certs.is_empty()
}