[Protocol] Replace some usage of remaining_length with the more appropiate is_remaining_empty

This commit is contained in:
CosminPerRam 2023-06-27 00:23:19 +03:00
parent 8fe521749a
commit dd80d6309f
4 changed files with 6 additions and 6 deletions

View file

@ -64,7 +64,7 @@ fn parse_players_and_teams(packet: Vec<u8>) -> GDResult<Vec<Player>> {
let count = buf.get_u16()?;
let mut players = Vec::with_capacity(count as usize);
while buf.remaining_length() > 0 {
while !buf.is_remaining_empty() {
players.push(Player {
name: buf.get_string_utf8()?,
steam_id: buf.get_string_utf8()?,