Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix clippy lints #950

Merged
merged 1 commit into from Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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