Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hatoo committed Oct 30, 2024
1 parent 591b58a commit be19593
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,15 @@ impl<C: Borrow<rcgen::CertifiedKey> + Send + Sync + 'static> MitmProxy<C> {
}

fn get_certified_key(&self, host: String) -> Option<CertifiedKeyDer> {
if let Some(root_cert) = self.root_cert.as_ref() {
Some(if let Some(cache) = self.cert_cache.as_ref() {
self.root_cert.as_ref().map(|root_cert| {
if let Some(cache) = self.cert_cache.as_ref() {
cache.get_with(host.clone(), move || {
generate_cert(host, root_cert.borrow())
})
} else {
generate_cert(host, root_cert.borrow())
})
} else {
None
}
}
})
}

fn server_config(
Expand Down

0 comments on commit be19593

Please sign in to comment.