removed return for client struct

the client struct that gets returned from hashmap when removed no longer needs to be passed back up the stack frame as client is now passed by a self reference
This commit is contained in:
Mitchell 2020-06-30 14:22:36 +01:00
parent 35d391eb8a
commit ef62657571
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
use crate::server::client::client_profile::Client;
//use crate::client_management::client_profile::Client;
use std::sync::Mutex;
use std::sync::Arc;
use std::collections::HashMap;
pub fn remove_client(clients_ref: &Arc<Mutex<HashMap<String, Client>>>, client: &Client){
let mut clients_hashmap = clients_ref.lock().unwrap();
clients_hashmap.remove(client.get_uuid()).unwrap();
}