pub async fn cleanup_session(
    session_id: &str,
    sessions: &data_types::SafeSessions,
    game_states: &data_types::SafeGameStates,
) {
    // remove session
    sessions.write().await.remove(session_id);
    // remove possible game state
    game_states.write().await.remove(session_id);
    // log
    println!(
        "[event] removed empty session :: remaining session count: {}",
        sessions.read().await.len()
    );
}
/// Remove a sessions and the possible game state that accompanies it

Remove a sessions and the possible game state that accompanies it
Remove a sessions and the possible game state that accompanies it
pub async fn cleanup_session(
    session_id: &str,
    sessions: &data_types::SafeSessions,
    game_states: &data_types::SafeGameStates,
) {
    // remove session
    sessions.write().await.remove(session_id);
    // remove possible game state
    game_states.write().await.remove(session_id);
    // log
    println!(
        "[event] removed empty session :: remaining session count: {}",
        sessions.read().await.len()
    );
}
pub async fn cleanup_session ( session_id : & str , sessions : & data_types :: SafeSessions , game_states : & data_types :: SafeGameStates , ) { // remove session
 sessions . write ( ) . await . remove ( session_id ) ; // remove possible game state
 game_states . write ( ) . await . remove ( session_id ) ; // log
 println ! ( " " sessions read ( ) await len ( ) ) ; }
Remove a sessions and the possible game state that accompanies it
Remove a sessions and the possible game state that accompanies it
session_id
&str
sessions
&data_types::SafeSessions
game_states
&data_types::SafeGameStates
session_id
&str
sessions
&data_types::SafeSessions
game_states
&data_types::SafeGameStates