style(phantun) use the clap::Command struct, removed the deprecated clap::App usage

This commit is contained in:
Datong Sun 2022-04-08 19:53:37 -07:00
parent 66b0bc11b0
commit 9c85b43e94
2 changed files with 4 additions and 4 deletions

View File

@ -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(

View File

@ -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(