From 2ef0a056be949070d24ac1f943048065599160cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jan 2022 08:24:57 +0000 Subject: [PATCH] chore(deps): update clap requirement from 2.34 to 3.0 Updates the requirements on [clap](https://github.com/clap-rs/clap) to permit the latest version. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_generate-v3.0.0-rc.0...clap_complete-v3.0.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- phantun/Cargo.toml | 2 +- phantun/src/bin/client.rs | 14 +++++++------- phantun/src/bin/server.rs | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/phantun/Cargo.toml b/phantun/Cargo.toml index a2506dd..134b5b1 100644 --- a/phantun/Cargo.toml +++ b/phantun/Cargo.toml @@ -11,7 +11,7 @@ Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs. """ [dependencies] -clap = "2.34" +clap = { version = "3.0", features = ["cargo"] } socket2 = { version = "0.4", features = ["all"] } fake-tcp = "0.2" tokio = { version = "1.14", features = ["full"] } diff --git a/phantun/src/bin/client.rs b/phantun/src/bin/client.rs index b723ecc..57a73fe 100644 --- a/phantun/src/bin/client.rs +++ b/phantun/src/bin/client.rs @@ -42,8 +42,8 @@ async fn main() { .version(crate_version!()) .author("Datong Sun (github.com/dndx)") .arg( - Arg::with_name("local") - .short("l") + Arg::new("local") + .short('l') .long("local") .required(true) .value_name("IP:PORT") @@ -51,8 +51,8 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("remote") - .short("r") + Arg::new("remote") + .short('r') .long("remote") .required(true) .value_name("IP or HOST NAME:PORT") @@ -60,7 +60,7 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("tun") + Arg::new("tun") .long("tun") .required(false) .value_name("tunX") @@ -69,7 +69,7 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("tun_local") + Arg::new("tun_local") .long("tun-local") .required(false) .value_name("IP") @@ -78,7 +78,7 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("tun_peer") + Arg::new("tun_peer") .long("tun-peer") .required(false) .value_name("IP") diff --git a/phantun/src/bin/server.rs b/phantun/src/bin/server.rs index 70267dd..431720e 100644 --- a/phantun/src/bin/server.rs +++ b/phantun/src/bin/server.rs @@ -16,8 +16,8 @@ async fn main() { .version(crate_version!()) .author("Datong Sun (github.com/dndx)") .arg( - Arg::with_name("local") - .short("l") + Arg::new("local") + .short('l') .long("local") .required(true) .value_name("PORT") @@ -25,8 +25,8 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("remote") - .short("r") + Arg::new("remote") + .short('r') .long("remote") .required(true) .value_name("IP or HOST NAME:PORT") @@ -34,7 +34,7 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("tun") + Arg::new("tun") .long("tun") .required(false) .value_name("tunX") @@ -43,7 +43,7 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("tun_local") + Arg::new("tun_local") .long("tun-local") .required(false) .value_name("IP") @@ -52,7 +52,7 @@ async fn main() { .takes_value(true), ) .arg( - Arg::with_name("tun_peer") + Arg::new("tun_peer") .long("tun-peer") .required(false) .value_name("IP")