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:
10
src/lib.rs
10
src/lib.rs
@ -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()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user