chore: Fix clippy lints (#950)

This commit is contained in:
tottoto
2022-03-31 13:42:00 -04:00
committed by GitHub
parent 619654e3e6
commit 9dab8be5fc
4 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ impl Builder {
PathBuf::from(std::env::var("OUT_DIR").unwrap())
};
config.out_dir(out_dir.clone());
config.out_dir(out_dir);
if let Some(path) = self.file_descriptor_set_path.as_ref() {
config.file_descriptor_set_path(path);
}
+1 -1
View File
@@ -169,7 +169,7 @@ where
// HTTP method of the HTTP request, so we extract them here and then add them back in below.
let uri = req.uri().clone();
let method = req.method().clone();
let version = req.version().clone();
let version = req.version();
let req = crate::Request::from_http(req);
let (metadata, extensions, msg) = req.into_parts();
+1 -4
View File
@@ -116,10 +116,7 @@ where
let inner = inner.connect_info();
let certs = if let Some(certs) = session.peer_certificates() {
let certs = certs
.into_iter()
.map(|c| Certificate::from_pem(c))
.collect();
let certs = certs.iter().map(Certificate::from_pem).collect();
Some(Arc::new(certs))
} else {
None
-1
View File
@@ -151,7 +151,6 @@ impl<L> Server<L> {
/// Configure TLS for this server.
#[cfg(feature = "tls")]
#[cfg_attr(docsrs, doc(cfg(feature = "tls")))]
#[must_use]
pub fn tls_config(self, tls_config: ServerTlsConfig) -> Result<Self, Error> {
Ok(Server {
tls: Some(tls_config.tls_acceptor().map_err(Error::from_source)?),