/// Asserts that a player did not receive
/// any packets of the given type.
/// Panics if not.
Asserts that a player did not receive
any packets of the given type.
Panics if not.
Asserts that a player did not receive any packets of the given type . Panics if not .
pub fn assert_packet_not_received(player: &Player, ty: PacketType) {
    while let Ok(Some(msg)) = player.network_receiver.borrow_mut().try_next() {
        if let ServerToWorkerMessage::SendPacket(packet) = msg {
            assert_ne!(packet.ty(), ty);
        }
    }
}
pub fn assert_packet_not_received ( player : & Player , ty : PacketType ) { while let Ok ( Some ( msg ) ) = player . network_receiver . borrow_mut ( ) . try_next ( ) { if let ServerToWorkerMessage :: SendPacket ( packet ) = msg { assert_ne ! ( packet ty ( ) ty ) ; } } }
Asserts that a player did not receive
any packets of the given type.
Asserts that a player did not receive any packets of the given type .
player
&Player
ty
PacketType