-
Notifications
You must be signed in to change notification settings - Fork 190
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
implement http-body 1.0 for PathBody #3673
Conversation
@@ -238,407 +244,3 @@ enum State { | |||
bytes_left: u64, | |||
}, | |||
} | |||
|
|||
impl http_body_0_4::Body for PathBody { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this isn't breaking b/c it's only an impl and it already required the http-body-0-4-x
feature.
A new generated diff is ready to view.
A new doc preview is ready to view. |
// assert that the specified length is used as size hint | ||
assert_eq!(body.content_length(), Some(file_length)); | ||
|
||
let mut body1 = body.try_clone().expect("retryable bodies are cloneable"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: body1
existed before this PR, but maybe good to rename it now to something just body
or body_04
since this code is under the body_0_4
module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it was copied from a another test where the body was cloned several times and each clone had its own number. I've renamed this to body1 and the test still passes.
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
#1925
Description
Implements the v1
http_body::Body
trait forPathBody
. Part of the ongoing hyper v1 upgrade.This also moves a pre-1.0 impl into its own module.
Testing
I ported the tests too
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.