Commit Graph
15 Commits
Author SHA1 Message Date
Eduardo Sánchez Muñoz 12b2567b95 chore: use poll_fn from std (#6810) 2024-09-05 09:54:06 +02:00
Havish Maka 11f66f43a0 chore: replace ready! with std::task::ready! (#6804) 2024-08-29 22:02:56 +02:00
Rafael Bachmann be9328da75 chore: fix clippy warnings (#6466) 2024-04-08 20:44:18 +09:00
M.Amin Rayej 4601c84718 stream: add next_many and poll_next_many to StreamMap (#6409) 2024-03-26 18:38:53 +03:30
Owen Leung 131e7b4e49 ci: add spellchecking (#6297) 2024-01-29 10:53:43 +01:00
Alice Ryhl c7e7f203ee chore: typographic improvements (#6262) 2024-01-03 18:01:27 +00:00
Weijia Jiang 707fb4d0df tokio: remove wildcard in match patterns (#5970) 2023-09-23 22:05:44 +02:00
Aviram Hassan 9507f8b374 stream: add StreamNotifyClose (#4851) 2023-04-16 15:04:00 +00:00
Timmy Xiao a7bb054414 tokio: update stream, util, test to 2021 edition (#5571) 2023-03-21 17:36:40 +00:00
David Pedersen 3b339024f0 stream: impl Extend for StreamMap (#4272)
## Motivation

This allows `StreamMap` to be used with [`futures::stream::StreamExt::collect`][collect].

My use case is something like this:

```rust
let stream_map: StreamMap<_, _> = things
    .into_iter()
    .map(|thing| make_stream(thing)) // iterator of futures
    .collect::<FuturesUnordered<_>>() // stream of streams
    .collect::<StreamMap<_, _>>() // combine all the inner streams into one
    .await;

async fn make_stream(thing: Thing) -> impl Stream { ... }
```

[collect]: https://docs.rs/futures/0.3.17/futures/stream/trait.StreamExt.html#method.collect

## Solution

Add `Extend` impl that delegates to the inner `Vec`.
2021-11-23 11:54:06 +01:00
Nylonicious 84f6845bf2 stream: impl FromIterator for StreamMap (#4052) 2021-08-24 13:21:02 +02:00
oiovoyo 2e7de1ae1d stream: modify HashMap to StreamMap in example. (#3925) 2021-07-05 16:10:55 +02:00
Taiki Endo c4b6b130f3 chore: bump nightly to nightly-2021-04-25 (#3754) 2021-05-05 17:39:17 +02:00
Marco Ieni a08ce0d3e0 ci: check docs of private items (#3715) 2021-04-30 13:25:50 +02:00
Lucio Franco 8efa62013b Move stream items into tokio-stream (#3277)
This change removes all references to `Stream` from
within the `tokio` crate and moves them into a new
`tokio-stream` crate. Most types have had their
`impl Stream` removed as well in-favor of their
inherent methods.

Closes #2870
2020-12-15 20:24:38 -08:00