tower-rs / tower

async fn(Request) -> Result<Response, Error>
https://docs.rs/tower
MIT License
3.56k stars 281 forks source link

refactor: use `FuturesOrdered::push_back` instead of `FuturesOrdered::push` #735

Closed wafuwafu13 closed 1 year ago

wafuwafu13 commented 1 year ago

GitHub Actions / check-stable says " use of deprecated method futures_util::stream::FuturesOrdered::<Fut>::push: use push_back instead ".

ref: https://docs.rs/futures/latest/futures/stream/struct.FuturesOrdered.html

pub fn push(&mut self, future: Fut) 👎Deprecated: use push_back instead

wafuwafu13 commented 1 year ago

push_back is released v0.3.22 https://github.com/rust-lang/futures-rs/pull/2632

https://github.com/tower-rs/tower/actions/runs/4996600562/jobs/8950079959?pr=735

Checking futures v0.3.11
error[E0599]: no function or associated item named `push_back` found for struct `FuturesOrdered<_>` in the current scope
Error:    --> tower/src/util/call_all/ordered.rs:171:25
    |
171 |         FuturesOrdered::push_back(self, future)
    |                         ^^^^^^^^^ function or associated item not found in `FuturesOrdered<_>