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: Apply small refactoring #1642

Merged
merged 2 commits into from
Feb 29, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions examples/src/tls_rustls/client.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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