diff -r e7c059ac6e54 -r a158ff8f84ef rust/hedgewars-server/src/handlers/inroom.rs --- a/rust/hedgewars-server/src/handlers/inroom.rs Mon Sep 30 16:02:39 2019 +0200 +++ b/rust/hedgewars-server/src/handlers/inroom.rs Tue Oct 01 23:48:32 2019 +0300 @@ -52,7 +52,7 @@ [size, typ, body..MAX] => { VALID_MESSAGES.contains(typ) && match body { - [1...MAX_HEDGEHOGS_PER_TEAM, team, ..] if *typ == b'h' => { + [1..=MAX_HEDGEHOGS_PER_TEAM, team, ..] if *typ == b'h' => { team_indices.contains(team) } _ => *typ != b'h', @@ -272,12 +272,8 @@ Some((_, name)) => { client.teams_in_game -= 1; client.clan = room.find_team_color(client.id); - super::common::remove_teams( - room, - vec![name.to_string()], - client.is_in_game(), - response, - ); + let names = vec![name.to_string()]; + super::common::remove_teams(room, names, client.is_in_game(), response); match room.game_info { Some(ref info) if info.teams_in_game == 0 => { @@ -438,7 +434,7 @@ } VoteType::NewSeed => None, VoteType::HedgehogsPerTeam(number) => match number { - 1...MAX_HEDGEHOGS_PER_TEAM => None, + 1..=MAX_HEDGEHOGS_PER_TEAM => None, _ => Some("/callvote hedgehogs: Specify number from 1 to 8.".to_string()), }, };