Skip to content

Commit

Permalink
chore(test): Use http crate directly (hyperium#1829)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Aug 2, 2024
1 parent e3f2965 commit 0873bd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion tests/integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ tracing-subscriber = {version = "0.3"}
async-stream = "0.3"
http = "1"
http-body = "1"
hyper = "1"
hyper-util = "0.1"
tokio-stream = {version = "0.1.5", features = ["net"]}
tower = {version = "0.4", features = []}
Expand Down
7 changes: 3 additions & 4 deletions tests/integration_tests/tests/extensions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use hyper::{Request as HyperRequest, Response as HyperResponse};
use integration_tests::{
pb::{test_client, test_server, Input, Output},
BoxFuture,
Expand Down Expand Up @@ -113,9 +112,9 @@ struct InterceptedService<S> {
inner: S,
}

impl<S> Service<HyperRequest<BoxBody>> for InterceptedService<S>
impl<S> Service<http::Request<BoxBody>> for InterceptedService<S>
where
S: Service<HyperRequest<BoxBody>, Response = HyperResponse<BoxBody>>
S: Service<http::Request<BoxBody>, Response = http::Response<BoxBody>>
+ NamedService
+ Clone
+ Send
Expand All @@ -130,7 +129,7 @@ where
self.inner.poll_ready(cx)
}

fn call(&mut self, mut req: HyperRequest<BoxBody>) -> Self::Future {
fn call(&mut self, mut req: http::Request<BoxBody>) -> Self::Future {
let clone = self.inner.clone();
let mut inner = std::mem::replace(&mut self.inner, clone);

Expand Down

0 comments on commit 0873bd0

Please sign in to comment.