data return fix, now returns a Client type

This commit is contained in:
Mitchell 2020-06-20 14:56:45 +01:00
parent 714b33464c
commit 5a7e27f010
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ use std::sync::Mutex;
use std::sync::Arc;
use std::collections::HashMap;
pub fn remove_client(clients_ref: &Arc<Mutex<HashMap<String,Client>>>, uuid: &String){
pub fn remove_client(clients_ref: &Arc<Mutex<HashMap<String,Client>>>, uuid: &String) -> Client{
let mut clients_hashmap = clients_ref.lock().unwrap();
clients_hashmap.remove(uuid);
clients_hashmap.remove(uuid).unwrap()
}