Skip to content

Commit

Permalink
Fixed lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Abhijit Gadgil <[email protected]>
  • Loading branch information
agadgil-progress committed Jan 7, 2025
1 parent 702c65d commit b5a6732
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/core/src/tls/rustls_wrapper/readers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn certificates_from_file(path: impl AsRef<Path>)
let mut buf = buf_from_file(path.as_ref())?;
rustls_pemfile::certs(&mut buf).map(|c| {
c.map_err(|_| Error::FailedToReadCerts(path.as_ref().into()))
.map(|x| x.into_owned())
.map(CertificateDer::into_owned)
})
.collect()
}
Expand Down
5 changes: 2 additions & 3 deletions components/sup-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,9 @@ impl SrvClient {
let server_name_indication = config.ctl_server_name_indication.clone();
let tcp_stream = if let Some(tls_config) = config.maybe_tls_client_config()?.map(Arc::new) {
let domain = server_name_indication.unwrap_or_else(|| addr.domain().to_string());
let domain: &str = &*domain;
debug!("Upgrading ctl-gateway to TLS with domain '{}'", domain);
TcpOrTlsStream::new_tls_client(tcp_stream, tls_config, domain).await
.map_err(|e| e.0)?
TcpOrTlsStream::new_tls_client(tcp_stream, tls_config, &domain).await
.map_err(|e| e.0)?
} else {
TcpOrTlsStream::new(tcp_stream)
};
Expand Down

0 comments on commit b5a6732

Please sign in to comment.