/// Expects a ServiceFound call to the observer `stream`.
/// Panics if the call doesn't happen.
Expects a ServiceFound call to the observer `stream`.
Panics if the call doesn't happen.
Expects a ServiceFound call to the observer ` stream ` . Panics if the call doesn ' t happen .
fn expect_observer_service_found(
        exec: &mut fasync::TestExecutor,
        stream: &mut bredr::PeerObserverRequestStream,
    ) {
        let observer_fut = stream.select_next_some();
        pin_mut!(observer_fut);
        match exec.run_until_stalled(&mut observer_fut) {
            Poll::Ready(Ok(bredr::PeerObserverRequest::ServiceFound { responder, .. })) => {
                let _ = responder.send();
            }
            x => panic!("Expected ServiceFound request but got: {:?}", x),
        }
    }
fn expect_observer_service_found ( exec : & mut fasync :: TestExecutor , stream : & mut bredr :: PeerObserverRequestStream , ) { let observer_fut = stream . select_next_some ( ) ; pin_mut ! ( observer_fut ) ; match exec . run_until_stalled ( & mut observer_fut ) { Poll :: Ready ( Ok ( bredr :: PeerObserverRequest :: ServiceFound { responder , .. } ) ) => { let _ = responder . send ( ) ; } x => panic ! ( " " x ) , } }
Expects a ServiceFound call to the observer `stream`.
Expects a ServiceFound call to the observer ` stream ` .
exec
&mut fasync::TestExecutor
stream
&mut bredr::PeerObserverRequestStream