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

Added IntoFuture for RequestBuilder #1633

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jewlexx
Copy link

@jewlexx jewlexx commented Sep 24, 2022

Implements the IntoFuture trait for RequestBuilder.

Only works for Rust versions greater than 1.64, hence I also added a feature flag for it so that it isn't enabled by default and won't break existing implementations on older Rust versions.

Closes #1632

@jewlexx
Copy link
Author

jewlexx commented Sep 24, 2022

#1632

@Suyashtnt
Copy link

Any updates on when this will be updated/merged?

@seanmonstar
Copy link
Owner

The hold up is that providing this impl would require all to upgrade their compiler version. While it's definitely useful, we've so far tried to only require compiler upgrades when it provides something very important (or at the least, the new MSRV we choose is 6+ months old).

One option is to use a build.rs file to conditionally add the impl if the compiler is new enough...

@jewlexx
Copy link
Author

jewlexx commented Nov 16, 2022

@seanmonstar That is why I added the feature flag. My hope was that end developers would only enable said flag if they had the required Rust version, and until rust-lang/rust#64796 is stabilised, that seemed like the best way, bar using a crate that enables that functionality such as https://github.com/dtolnay/rustversion

@jewlexx
Copy link
Author

jewlexx commented Dec 8, 2022

Another note on using rustversion to conditionally compile it is that it currently has an MSRV of 1.31 which is significantly lower than reqwest's current MSRV of 1.56, so it would only require an additional dependency.

@Sytten
Copy link

Sytten commented Sep 11, 2024

Given that this was 2 years ago, it probably ok to just use that as is now.

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.

Implement IntoFuture for RequestBuilder
4 participants