From 9860a6f144305ab217dfe4be2b0784aa3b59f225 Mon Sep 17 00:00:00 2001 From: Petr Portnov | PROgrm_JARvis Date: Mon, 19 Feb 2024 01:32:02 +0300 Subject: [PATCH 1/2] feat: parse Clap args before starting `async` runtime (#690) This also fixes Mergify --- .mergify.yml | 2 +- src/main.rs | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 231bd2b..a3571d3 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -11,5 +11,5 @@ pull_request_rules: - base=development actions: queue: - method: merge + method: squash name: dependabot-updates diff --git a/src/main.rs b/src/main.rs index a4c97eb..7b12a24 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,15 +41,21 @@ struct CommandLineOptions { flavor: OutputFlavor, } +fn main() { + let options = CommandLineOptions::parse(); + + run(options); +} + #[tokio::main(flavor = "current_thread")] -async fn main() { - let CommandLineOptions { +async fn run( + CommandLineOptions { hostname, port, timeout, flavor, - } = CommandLineOptions::parse(); - + }: CommandLineOptions, +) { let hostname = hostname.as_str(); match TcpStream::connect((hostname, port)).await { From bad5073b9c47be8d2f7b43ae090d54c85cade552 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:16:50 +0300 Subject: [PATCH 2/2] build(deps): bump cc from 1.0.83 to 1.0.86 (#695) Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.0.83 to 1.0.86. - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.83...1.0.86) --- updated-dependencies: - dependency-name: cc dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e34affd..0694f87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,12 +94,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" [[package]] name = "cfg-if"