refactor: Remove Body's Once variant#2923
Conversation
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
|
Looks like a couple tests that were using the |
pub fn get(&self, uri: Uri) -> ResponseFuture
where
B: Default,
|
|
No, that method doesn't need to be removed (yet). Just change the tests to use |
|
I'm feeling challenged to migrate tests like In those tests, both request and response depend on Any ideas? |
I just took a look, and this should be able to fix it: type Empty = http_body_util::Empty<Bytes>;
let service = service_fn(|_:Request<Body>| future::ok::<_, hyper::Error>(Response::new(Empty::new())));
// ...
let req = Request::builder()
.uri(format!("http://{}/", addr))
.body(Empty::new())
.expect("request builder");You don't need to change the |
|
Thanks so much for taking it so far! I took care of merge conflicts and finishing out the examples, and completed it in #2922. |
Signed-off-by: Xuanwo github@xuanwo.io
Fix #2922
I'm not sure whether I correctly did this, PTAL.