From 40bff4f8e4e67337a9ddb3379af27e53bf898e71 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Wed, 26 Apr 2023 00:31:35 +0000 Subject: [PATCH 1/2] Update Rust crate tokio to 1.28.0 --- rust/Cargo.lock | 13 ++++++------- rust/sea_battle_cli_player/Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index c6a1d7b..965309f 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -2024,14 +2024,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot", @@ -2039,18 +2038,18 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.11", ] [[package]] diff --git a/rust/sea_battle_cli_player/Cargo.toml b/rust/sea_battle_cli_player/Cargo.toml index c499c71..302b922 100644 --- a/rust/sea_battle_cli_player/Cargo.toml +++ b/rust/sea_battle_cli_player/Cargo.toml @@ -19,7 +19,7 @@ env_logger = "0.10.0" tui = "0.19.0" crossterm = "0.26.1" lazy_static = "1.4.0" -tokio = "1.21.2" +tokio = "1.28.0" num = "0.4.0" num-traits = "0.2.15" num-derive = "0.3.3" From 77d5b18f792a8ef5c9af14f38f5f18c6deeff214 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Mon, 1 May 2023 10:28:43 +0200 Subject: [PATCH 2/2] Fix cargo clippy issue --- rust/sea_battle_cli_player/src/client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/sea_battle_cli_player/src/client.rs b/rust/sea_battle_cli_player/src/client.rs index b9d94f4..89e202e 100644 --- a/rust/sea_battle_cli_player/src/client.rs +++ b/rust/sea_battle_cli_player/src/client.rs @@ -62,7 +62,7 @@ impl Client { &cli_args().local_server_address(), &format!( "/play/bot?{}", - serde_urlencoded::to_string(&BotPlayQuery { + serde_urlencoded::to_string(BotPlayQuery { rules: rules.clone(), player_name: "Human".to_string() }) @@ -78,7 +78,7 @@ impl Client { &cli_args().remote_server, &format!( "/play/random?{}", - serde_urlencoded::to_string(&PlayRandomQuery { + serde_urlencoded::to_string(PlayRandomQuery { player_name: player_name.to_string() }) .unwrap() @@ -93,7 +93,7 @@ impl Client { &cli_args().remote_server, &format!( "/play/create_invite?{}", - serde_urlencoded::to_string(&CreateInviteQuery { + serde_urlencoded::to_string(CreateInviteQuery { rules: rules.clone(), player_name: player_name.to_string() }) @@ -109,7 +109,7 @@ impl Client { &cli_args().remote_server, &format!( "/play/accept_invite?{}", - serde_urlencoded::to_string(&AcceptInviteQuery { + serde_urlencoded::to_string(AcceptInviteQuery { code, player_name: player_name.to_string() })