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

feat(client): add 1.0 compatible client conn API #3155

Merged
merged 1 commit into from
Mar 6, 2023
Merged

Conversation

seanmonstar
Copy link
Member

This patch backports client/conn/http1 and http2 modules from 1.0 to ease transition. It allows code still using 0.14.x to switch to the per-version Connection types available in 1.0.

Updating (part of) #3063

Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! I went over and compared this with master. I know these won't the same everywhere, but I think what I have highlighted should be the same.

Cargo.toml Outdated Show resolved Hide resolved
src/client/conn/http1.rs Outdated Show resolved Hide resolved
src/client/conn/http1.rs Outdated Show resolved Hide resolved
src/client/conn/http1.rs Outdated Show resolved Hide resolved
src/client/conn/http1.rs Outdated Show resolved Hide resolved
src/client/conn/http2.rs Outdated Show resolved Hide resolved
src/client/conn/http2.rs Outdated Show resolved Hide resolved
src/client/conn/http2.rs Outdated Show resolved Hide resolved
src/client/conn/http2.rs Outdated Show resolved Hide resolved
Comment on lines +2322 to +2331
struct TokioExec;
impl<F> hyper::rt::Executor<F> for TokioExec
where
F: std::future::Future + Send + 'static,
F::Output: Send + 'static,
{
fn execute(&self, fut: F) {
tokio::spawn(fut);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: should we move this outside the test (but inside the backports test module)?

This patch backports client/conn/http1 and http2 modules from 1.0 to
ease transition. It allows code still using 0.14.x to switch to the
per-version Connection types available in 1.0.
@seanmonstar seanmonstar merged commit 253cc74 into 0.14.x Mar 6, 2023
@seanmonstar seanmonstar deleted the 3063-backports branch March 6, 2023 18:33
oddgrd pushed a commit to oddgrd/hyper that referenced this pull request Mar 7, 2023
This patch backports client/conn/http1 and http2 modules from 1.0 to
ease transition. It allows code still using 0.14.x to switch to the
per-version Connection types available in 1.0.

Closes hyperium#3053 

Co-authored-by: KOVACS Tamas <[email protected]>
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.

3 participants