File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ cfg_if! {
6565 #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
6666 pub mod pin;
6767
68+ mod unit;
6869 mod vec;
6970 mod result;
7071 mod option;
Original file line number Diff line number Diff line change 1+ use std:: pin:: Pin ;
2+
3+ use crate :: prelude:: * ;
4+ use crate :: stream:: { FromStream , IntoStream } ;
5+
6+ impl FromStream < ( ) > for ( ) {
7+ #[ inline]
8+ fn from_stream < ' a , S : IntoStream < Item = ( ) > > (
9+ stream : S ,
10+ ) -> Pin < Box < dyn core:: future:: Future < Output = Self > + ' a > >
11+ where
12+ <S as IntoStream >:: IntoStream : ' a ,
13+ {
14+ Box :: pin ( stream. into_stream ( ) . for_each ( |_| ( ) ) )
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ //! The Rust primitive `()` type, sometimes called "unit" or "nil".
2+ //!
3+ //! This module provides types and implementations for working
4+ //! asynchronously with values of type `()`.
5+
6+ mod from_stream;
You can’t perform that action at this time.
0 commit comments