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

implement http-body 1.0 for PathBody #3673

Merged
merged 6 commits into from
Jun 3, 2024
Merged

Conversation

Velfi
Copy link
Contributor

@Velfi Velfi commented May 30, 2024

Motivation and Context

#1925

Description

Implements the v1 http_body::Body trait for PathBody. 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

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Velfi Velfi requested review from a team as code owners May 30, 2024 15:49
@@ -238,407 +244,3 @@ enum State {
bytes_left: u64,
},
}

impl http_body_0_4::Body for PathBody {
Copy link
Contributor Author

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.

Copy link

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");
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link

github-actions bot commented Jun 3, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

github-actions bot commented Jun 3, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

@Velfi Velfi enabled auto-merge June 3, 2024 20:43
@Velfi Velfi added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit 9c1ae5a Jun 3, 2024
44 checks passed
@Velfi Velfi deleted the zhessler-pathbody-http-body-1-0 branch June 3, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants