mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
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
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
use tokio_stream::{self as stream, Stream, StreamExt};
|
||||
|
||||
#[tokio::test]
|
||||
async fn basic_usage() {
|
||||
let mut stream = stream::empty::<i32>();
|
||||
|
||||
for _ in 0..2 {
|
||||
assert_eq!(stream.size_hint(), (0, Some(0)));
|
||||
assert_eq!(None, stream.next().await);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user