From 9c85b43e9425007b11c0fcb9016c186063e33881 Mon Sep 17 00:00:00 2001 From: Datong Sun Date: Fri, 8 Apr 2022 19:53:37 -0700 Subject: [PATCH] style(phantun) use the `clap::Command` struct, removed the deprecated `clap::App` usage --- phantun/src/bin/client.rs | 4 ++-- phantun/src/bin/server.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phantun/src/bin/client.rs b/phantun/src/bin/client.rs index 57a73fe..c31ead6 100644 --- a/phantun/src/bin/client.rs +++ b/phantun/src/bin/client.rs @@ -1,4 +1,4 @@ -use clap::{crate_version, App, Arg}; +use clap::{crate_version, Arg, Command}; use fake_tcp::packet::MAX_PACKET_LEN; use fake_tcp::{Socket, Stack}; use log::{debug, error, info}; @@ -38,7 +38,7 @@ fn new_udp_reuseport(addr: SocketAddr) -> UdpSocket { async fn main() { pretty_env_logger::init(); - let matches = App::new("Phantun Client") + let matches = Command::new("Phantun Client") .version(crate_version!()) .author("Datong Sun (github.com/dndx)") .arg( diff --git a/phantun/src/bin/server.rs b/phantun/src/bin/server.rs index 431720e..6ab68a9 100644 --- a/phantun/src/bin/server.rs +++ b/phantun/src/bin/server.rs @@ -1,4 +1,4 @@ -use clap::{crate_version, App, Arg}; +use clap::{crate_version, Arg, Command}; use fake_tcp::packet::MAX_PACKET_LEN; use fake_tcp::Stack; use log::{error, info}; @@ -12,7 +12,7 @@ const UDP_TTL: Duration = Duration::from_secs(180); async fn main() { pretty_env_logger::init(); - let matches = App::new("Phantun Server") + let matches = Command::new("Phantun Server") .version(crate_version!()) .author("Datong Sun (github.com/dndx)") .arg(