mirror of
https://github.com/szymon-jozef/checkers.git
synced 2026-10-27 19:20:44 +01:00
refactor: move update function of the network client to the constructor
This commit is contained in:
@@ -88,13 +88,11 @@ async fn run_bot() {
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
env_logger::init();
|
||||
|
||||
let Some(mut client) = Client::new().await else {
|
||||
let Some(mut client) = Client::new(None).await else {
|
||||
println!("Not worky, ending");
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
client.update();
|
||||
|
||||
let (stdin_sender, mut stdin_receiver) = mpsc::channel(1024);
|
||||
|
||||
let mut context: ClientContext = ClientContext::default();
|
||||
|
||||
Reference in New Issue
Block a user