pub fn assert_packet_received(player: &Player, ty: PacketType) -> Box<dyn Packet> {
    while let Ok(Some(msg)) = player.network_receiver.borrow_mut().try_next() {
        if let ServerToWorkerMessage::SendPacket(packet) = msg {
            if packet.ty() == ty {
                return packet;
            }
        }
    }

    panic!();
}
/// Asserts that the given player has received
/// a packet of the given type, returning the packet.
Asserts that the given player has received
a packet of the given type, returning the packet.
Asserts that the given player has received a packet of the given type returning the packet .
pub fn assert_packet_received(player: &Player, ty: PacketType) -> Box<dyn Packet> {
    while let Ok(Some(msg)) = player.network_receiver.borrow_mut().try_next() {
        if let ServerToWorkerMessage::SendPacket(packet) = msg {
            if packet.ty() == ty {
                return packet;
            }
        }
    }
    panic!();
}
pub fn assert_packet_received ( player : & Player , ty : PacketType ) -> Box < dyn Packet > { while let Ok ( Some ( msg ) ) = player . network_receiver . borrow_mut ( ) . try_next ( ) { if let ServerToWorkerMessage :: SendPacket ( packet ) = msg { if packet . ty ( ) == ty { return packet ; } } } panic ! ( ) ; }
Asserts that the given player has received
a packet of the given type, returning the packet.
Asserts that the given player has received a packet of the given type returning the packet .
player
&Player
ty
PacketType
player
&Player
ty
PacketType