terrified to start testing
This commit is contained in:
@@ -23,7 +23,7 @@ pub fn stream<'a, T: 'a>(
|
||||
let (send, recv) = mpsc::channel::<T>(1);
|
||||
let fut = async { f(StreamCtx(send, PhantomData)).await };
|
||||
// use options to ensure that the stream is driven to exhaustion
|
||||
select_with_strategy(fut.into_stream().map(|()| None), recv.map(|t| Some(t)), left_strat)
|
||||
select_with_strategy(fut.into_stream().map(|()| None), recv.map(Some), left_strat)
|
||||
.filter_map(async |opt| opt)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user