From 5ffc076d61f6513269069ed00d898390e1658296 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 24 Feb 2024 10:53:59 +0900 Subject: [PATCH 1/2] chore(interop): Replace map clone with cloned --- interop/src/server.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/interop/src/server.rs b/interop/src/server.rs index 6ffb16309..b32468866 100644 --- a/interop/src/server.rs +++ b/interop/src/server.rs @@ -194,15 +194,12 @@ where } fn call(&mut self, req: http::Request) -> Self::Future { - let echo_header = req - .headers() - .get("x-grpc-test-echo-initial") - .map(Clone::clone); + let echo_header = req.headers().get("x-grpc-test-echo-initial").cloned(); let echo_trailer = req .headers() .get("x-grpc-test-echo-trailing-bin") - .map(Clone::clone) + .cloned() .map(|v| (HeaderName::from_static("x-grpc-test-echo-trailing-bin"), v)); let call = self.inner.call(req); From f8fb07645a04731520c76e53487f45d065447b9f Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 24 Feb 2024 10:54:58 +0900 Subject: [PATCH 2/2] chore(examples): Remove importing prelude trait --- examples/src/tls_rustls/client.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/src/tls_rustls/client.rs b/examples/src/tls_rustls/client.rs index 503526234..23d6e8130 100644 --- a/examples/src/tls_rustls/client.rs +++ b/examples/src/tls_rustls/client.rs @@ -5,8 +5,6 @@ pub mod pb { tonic::include_proto!("/grpc.examples.unaryecho"); } -use std::iter::FromIterator; - use hyper::{client::HttpConnector, Uri}; use pb::{echo_client::EchoClient, EchoRequest}; use tokio_rustls::rustls::{ClientConfig, RootCertStore};