fn assert_receive_done<FutureType, T>(
    cx: &mut Context,
    receive_fut: &mut core::pin::Pin<&mut FutureType>,
    value: Option<T>,
) where
    FutureType: Future<Output = Option<T>> + FusedFuture,
    T: PartialEq + core::fmt::Debug,
{
    match receive_fut.as_mut().poll(cx) {
        Poll::Pending => panic!("future is not ready"),
        Poll::Ready(res) => {
            if res != value {
                panic!("Unexpected value {:?}", res);
            }
        }
    };
    assert!(receive_fut.as_mut().is_terminated());
}
// A stream future shouldn't terminate until the stream
// terminates.
A stream future shouldn't terminate until the stream
terminates.
A stream future shouldn ' t terminate until the stream terminates .
fn assert_receive_done<FutureType, T>(
    cx: &mut Context,
    receive_fut: &mut core::pin::Pin<&mut FutureType>,
    value: Option<T>,
) where
    FutureType: Future<Output = Option<T>> + FusedFuture,
    T: PartialEq + core::fmt::Debug,
{
    match receive_fut.as_mut().poll(cx) {
        Poll::Pending => panic!("future is not ready"),
        Poll::Ready(res) => {
            if res != value {
                panic!("Unexpected value {:?}", res);
            }
        }
    };
    assert!(receive_fut.as_mut().is_terminated());
}
fn assert_receive_done < FutureType , T > ( cx : & mut Context , receive_fut : & mut core :: pin :: Pin < & mut FutureType > , value : Option < T > , ) where FutureType : Future < Output = Option < T > > + FusedFuture , T : PartialEq + core :: fmt :: Debug , { match receive_fut . as_mut ( ) . poll ( cx ) { Poll :: Pending => panic ! ( " " ) , Poll :: Ready ( res ) => { if res != value { panic ! ( " " res ) ; } } } ; assert ! ( receive_fut as_mut ( ) is_terminated ( ) ) ; }
A stream future shouldn't terminate until the stream
terminates.
A stream future shouldn ' t terminate until the stream terminates .
cx
&mut Context
receive_fut
&mut core::pin::Pin<&mut FutureType>
value
Option<T>
cx
&mut Context
receive_fut
&mut core::pin::Pin<&mut FutureType>
value
Option<T>