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

chore: Remove futures crates #1478

Merged
merged 2 commits into from Aug 29, 2023

Conversation

tottoto
Copy link
Contributor

@tottoto tottoto commented Aug 26, 2023

Motivation

Completes of removing futures crates.

Solution

  • Replaces futures_{core, util}::ready with std::task::ready, which was stabilized at Rust 1.64.
  • Uses pin_utils crate directly instead of via futures_util. (When tonic's MSRV be bumped to Rust 1.68 in the future, std::pin::pin can be used.)

tonic/Cargo.toml Outdated
@@ -50,7 +50,7 @@ channel = []
[dependencies]
base64 = "0.21"
bytes = "1.0"
futures-util = {version = "0.3", default-features = false}
pin-utils = "0.1"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, tokio has been used behind transport feature. To use tokio::pin macro, we have to use tokio throughout tonic implementations. I think tonic is mostly used with tokio so it seems not to be really matter. However, as I'm not sure whether it is appropriate to always depend on tokio only for using tokio::pin, I would like to hear your opinion.

Copy link
Member

Choose a reason for hiding this comment

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

If we depend on tokio's default features (which should be basically empty) then it should be available and pretty light weight.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reviews! I'll fix to use tokio.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@LucioFranco
Copy link
Member

Thanks!

@LucioFranco LucioFranco added this pull request to the merge queue Aug 29, 2023
Merged via the queue into hyperium:master with commit 2325e32 Aug 29, 2023
16 checks passed
@tottoto tottoto deleted the remove-futures-crates branch August 29, 2023 15:08
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

2 participants