Skip to content

Commit

Permalink
shorten ser logic
Browse files Browse the repository at this point in the history
  • Loading branch information
theaddonn committed Jul 30, 2024
1 parent 1ccfcf9 commit e6ebd18
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions proto/src/login/start_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,8 @@ pub async fn start_game(
},
};

match conn.send(GamePacket::StartGame(start_game)).await {
Ok(_) => {}
Err(e) => return Err(LoginError::ConnectionError(e)),
}

match conn.flush().await {
Ok(_) => {}
Err(e) => return Err(LoginError::ConnectionError(e)),
};
conn.send(GamePacket::StartGame(start_game)).await.map_err(|e| LoginError::ConnectionError(e))?;
conn.flush().await.map_err(|e| LoginError::ConnectionError(e))?;

Ok(())
}

0 comments on commit e6ebd18

Please sign in to comment.