-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
refactor: Remove Body's Once variant #2923
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
Conversation
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
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 |
Signed-off-by: Xuanwo <[email protected]>
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 [email protected]
Fix #2922
I'm not sure whether I correctly did this, PTAL.