Skip to content

Commit

Permalink
chore: Apply small refactoring (#1642)
Browse files Browse the repository at this point in the history
* chore(interop): Replace map clone with cloned

* chore(examples): Remove importing prelude trait
  • Loading branch information
tottoto committed Feb 29, 2024
1 parent 0522f48 commit 8a53392
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions examples/src/tls_rustls/client.rs
Expand Up @@ -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};
Expand Down
7 changes: 2 additions & 5 deletions interop/src/server.rs
Expand Up @@ -194,15 +194,12 @@ where
}

fn call(&mut self, req: http::Request<hyper::Body>) -> 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);
Expand Down

0 comments on commit 8a53392

Please sign in to comment.