async-std 1.6.0

Async version of the Rust standard library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::pin::Pin;

use crate::prelude::*;
use crate::stream::{FromStream, IntoStream};

impl FromStream<()> for () {
    #[inline]
    fn from_stream<'a, S: IntoStream<Item = ()> + 'a>(
        stream: S,
    ) -> Pin<Box<dyn Future<Output = Self> + 'a>> {
        Box::pin(stream.into_stream().for_each(drop))
    }
}