rust/hedgewars-server/src/server/handlers.rs
changeset 14810 18240b308505
parent 14809 6dea1ca64992
child 14812 b889d9e1115f
--- a/rust/hedgewars-server/src/server/handlers.rs	Thu Apr 11 19:30:22 2019 +0300
+++ b/rust/hedgewars-server/src/server/handlers.rs	Thu Apr 11 21:20:41 2019 +0300
@@ -166,11 +166,11 @@
         Destination::ToId(id) => vec![id],
         Destination::ToIds(ids) => ids,
         Destination::ToAll { group, skip_self } => {
-            let mut ids = match group {
-                DestinationGroup::All => server.clients.iter().map(|(id, _)| id).collect(),
-                DestinationGroup::Lobby => server.collect_lobby_clients(),
-                DestinationGroup::Protocol(proto) => server.protocol_clients(proto),
-                DestinationGroup::Room(id) => server.collect_room_clients(id),
+            let mut ids: Vec<_> = match group {
+                DestinationGroup::All => server.all_clients().collect(),
+                DestinationGroup::Lobby => server.lobby_clients().collect(),
+                DestinationGroup::Protocol(proto) => server.protocol_clients(proto).collect(),
+                DestinationGroup::Room(id) => server.room_clients(id).collect(),
             };
 
             if skip_self {