remove a 2015ism
authoralfadur
Wed, 19 Jun 2019 00:49:45 +0300
changeset 15173 21e87882df1c
parent 15172 dc94bb5990a0
child 15174 e705ac360785
remove a 2015ism
rust/hedgewars-server/src/server/network.rs
--- a/rust/hedgewars-server/src/server/network.rs	Mon Jun 17 20:55:11 2019 +0200
+++ b/rust/hedgewars-server/src/server/network.rs	Wed Jun 19 00:49:45 2019 +0300
@@ -349,14 +349,10 @@
     }
 
     fn deregister_client(&mut self, poll: &Poll, id: ClientId) {
-        let mut client_exists = false;
         if let Some(ref client) = self.clients.get(id) {
             poll.deregister(client.socket.inner())
                 .expect("could not deregister socket");
             info!("client {} ({}) removed", client.id, client.peer_addr);
-            client_exists = true;
-        }
-        if client_exists {
             self.clients.remove(id);
             #[cfg(feature = "official-server")]
             self.io.cancel(id);