fn confirm_num_server_requests(
        mut server_requests: mpsc::UnboundedReceiver<ServerRequest>,
        num: usize,
    ) -> Vec<mpsc::UnboundedReceiver<ServerRequest>> {
        let mut discovered_receivers = vec![];
        for i in 0..num {
            match server_requests.next().now_or_never() {
                Some(Some(ServerRequest::AddChildRealm { receive_requests, .. })) => {
                    discovered_receivers.push(receive_requests)
                }
                Some(Some(_)) => (),
                Some(None) => panic!("server_requests ended unexpectedly"),
                None => panic!("server_requests had less messages in it than we expected: {}", i),
            }
        }
        assert_matches!(server_requests.next().now_or_never(), None);
        discovered_receivers
    }
// Checks that there are exactly `num` messages currently waiting in the `server_requests`
// stream. Returns any mpsc receivers found in ServerRequest::AddChildRealm.
Checks that there are exactly `num` messages currently waiting in the `server_requests`
stream. Returns any mpsc receivers found in ServerRequest::AddChildRealm.
Checks that there are exactly ` num ` messages currently waiting in the ` server_requests ` stream . Returns any mpsc receivers found in ServerRequest :: AddChildRealm .
fn confirm_num_server_requests(
        mut server_requests: mpsc::UnboundedReceiver<ServerRequest>,
        num: usize,
    ) -> Vec<mpsc::UnboundedReceiver<ServerRequest>> {
        let mut discovered_receivers = vec![];
        for i in 0..num {
            match server_requests.next().now_or_never() {
                Some(Some(ServerRequest::AddChildRealm { receive_requests, .. })) => {
                    discovered_receivers.push(receive_requests)
                }
                Some(Some(_)) => (),
                Some(None) => panic!("server_requests ended unexpectedly"),
                None => panic!("server_requests had less messages in it than we expected: {}", i),
            }
        }
        assert_matches!(server_requests.next().now_or_never(), None);
        discovered_receivers
    }
fn confirm_num_server_requests ( mut server_requests : mpsc :: UnboundedReceiver < ServerRequest > , num : usize , ) -> Vec < mpsc :: UnboundedReceiver < ServerRequest > > { let mut discovered_receivers = vec ! [ ] ; for i in 0 .. num { match server_requests . next ( ) . now_or_never ( ) { Some ( Some ( ServerRequest :: AddChildRealm { receive_requests , .. } ) ) => { discovered_receivers . push ( receive_requests ) } Some ( Some ( _ ) ) => ( ) , Some ( None ) => panic ! ( " " ) , None => panic ! ( " " i ) , } } assert_matches ! ( server_requests next ( ) now_or_never ( ) None ) ; discovered_receivers }
Checks that there are exactly `num` messages currently waiting in the `server_requests`
stream.
Checks that there are exactly ` num ` messages currently waiting in the ` server_requests ` stream .
server_requests
mpsc::UnboundedReceiver<ServerRequest>
num
usize
server_requests
mpsc::UnboundedReceiver<ServerRequest>
num
usize