chore: Remove futures crates#1478
Conversation
tonic/Cargo.toml
Outdated
| base64 = "0.21" | ||
| bytes = "1.0" | ||
| futures-util = {version = "0.3", default-features = false} | ||
| pin-utils = "0.1" |
There was a problem hiding this comment.
I think we can use https://docs.rs/tokio/latest/tokio/macro.pin.html
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
If we depend on tokio's default features (which should be basically empty) then it should be available and pretty light weight.
There was a problem hiding this comment.
Thanks for reviews! I'll fix to use tokio.
7169064 to
fb1cd13
Compare
|
Thanks! |
Motivation
Completes of removing futures crates.
Solution
futures_{core, util}::readywithstd::task::ready, which was stabilized at Rust 1.64.pin_utilscrate directly instead of viafutures_util. (Whentonic's MSRV be bumped to Rust1.68in the future,std::pin::pincan be used.)