Skip to content

Commit

Permalink
chore: Fix clippy lints (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Mar 31, 2022
1 parent 619654e commit 9dab8be
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tonic-build/src/prost.rs
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion tonic/src/service/interceptor.rs
Expand Up @@ -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();

Expand Down
5 changes: 1 addition & 4 deletions tonic/src/transport/server/conn.rs
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tonic/src/transport/server/mod.rs
Expand Up @@ -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)?),
Expand Down

0 comments on commit 9dab8be

Please sign in to comment.