Skip to content

Commit a37a46f

Browse files
committed
running cargo fmt
1 parent 91e9d31 commit a37a46f

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

pingora-core/src/listeners/tls/rustls/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::listeners::TlsAcceptCallbacks;
1818
use crate::protocols::tls::{server::handshake, server::handshake_with_callback, TlsStream};
1919
use log::debug;
2020
use pingora_error::ErrorType::InternalError;
21-
use pingora_error::{Error, OrErr, Result, ErrorType, ErrorSource, RetryType, ImmutStr};
21+
use pingora_error::{Error, ErrorSource, ErrorType, ImmutStr, OrErr, Result, RetryType};
2222
use pingora_rustls::load_certs_and_key_files;
2323
use pingora_rustls::ClientCertVerifier;
2424
use pingora_rustls::ServerConfig;
@@ -53,15 +53,16 @@ impl TlsSettings {
5353
let Ok(Some((certs, key))) = load_certs_and_key_files(&self.cert_path, &self.key_path)
5454
else {
5555
let error_message = format!(
56-
"Failed to load provided certificates \"{}\" or key \"{}\".",
57-
self.cert_path, self.key_path);
56+
"Failed to load provided certificates \"{}\" or key \"{}\".",
57+
self.cert_path, self.key_path
58+
);
5859

5960
return Err(Box::new(Error {
6061
etype: ErrorType::InternalError,
61-
esource: ErrorSource::Internal,
62-
retry: RetryType::Decided(false),
62+
esource: ErrorSource::Internal,
63+
retry: RetryType::Decided(false),
6364
cause: None,
64-
context: Some(ImmutStr::Owned(error_message.into_boxed_str()))
65+
context: Some(ImmutStr::Owned(error_message.into_boxed_str())),
6566
}));
6667
};
6768

pingora-core/src/listeners/tls/s2n/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use std::sync::Arc;
1616

1717
use log::debug;
18-
use pingora_error::{Result, ErrorType, Error, ErrorSource, RetryType, ImmutStr};
18+
use pingora_error::{Error, ErrorSource, ErrorType, ImmutStr, Result, RetryType};
1919
use pingora_s2n::{
2020
load_certs_and_key_files, ClientAuthType, Config, IgnoreVerifyHostnameCallback, S2NPolicy,
2121
TlsAcceptor, DEFAULT_TLS13,
@@ -85,8 +85,8 @@ impl TlsSettings {
8585
if let Err(_) = builder.set_verify_host_callback(IgnoreVerifyHostnameCallback::new()) {
8686
return Err(Box::new(Error {
8787
etype: ErrorType::InternalError,
88-
esource: ErrorSource::Internal,
89-
retry: RetryType::Decided(false),
88+
esource: ErrorSource::Internal,
89+
retry: RetryType::Decided(false),
9090
cause: None,
9191
context: Some(ImmutStr::from("Failed to verify client hostname")),
9292
}));

0 commit comments

Comments
 (0)