mirror of
https://github.com/dndx/phantun.git
synced 2025-01-18 13:59:30 +08:00
style(phantun) use the clap::Command
struct, removed the deprecated clap::App
usage
This commit is contained in:
parent
66b0bc11b0
commit
9c85b43e94
@ -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(
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user