Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko committed Dec 13, 2024
1 parent 3a2463a commit 909b6e0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/vector-core/src/tls/incoming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ use crate::tcp::{self, TcpKeepaliveConfig};

impl TlsSettings {
pub fn acceptor(&self) -> crate::tls::Result<SslAcceptor> {
match self.identity {
None => Err(TlsError::MissingRequiredIdentity),
Some(_) => {
let mut acceptor = SslAcceptor::mozilla_intermediate(SslMethod::tls())
.context(CreateAcceptorSnafu)?;
self.apply_context_base(&mut acceptor, true)?;
Ok(acceptor.build())
}
if self.identity.is_none() { Err(TlsError::MissingRequiredIdentity) } else {
let mut acceptor = SslAcceptor::mozilla_intermediate(SslMethod::tls())
.context(CreateAcceptorSnafu)?;
self.apply_context_base(&mut acceptor, true)?;
Ok(acceptor.build())
}
}
}
Expand Down

0 comments on commit 909b6e0

Please sign in to comment.