mirror of
				https://github.com/dndx/phantun.git
				synced 2025-10-31 09:55:35 +08:00 
			
		
		
		
	style(phantun) use the clap::Command struct, removed the deprecated clap::App usage
				
					
				
			This commit is contained in:
		| @@ -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::packet::MAX_PACKET_LEN; | ||||||
| use fake_tcp::{Socket, Stack}; | use fake_tcp::{Socket, Stack}; | ||||||
| use log::{debug, error, info}; | use log::{debug, error, info}; | ||||||
| @@ -38,7 +38,7 @@ fn new_udp_reuseport(addr: SocketAddr) -> UdpSocket { | |||||||
| async fn main() { | async fn main() { | ||||||
|     pretty_env_logger::init(); |     pretty_env_logger::init(); | ||||||
|  |  | ||||||
|     let matches = App::new("Phantun Client") |     let matches = Command::new("Phantun Client") | ||||||
|         .version(crate_version!()) |         .version(crate_version!()) | ||||||
|         .author("Datong Sun (github.com/dndx)") |         .author("Datong Sun (github.com/dndx)") | ||||||
|         .arg( |         .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::packet::MAX_PACKET_LEN; | ||||||
| use fake_tcp::Stack; | use fake_tcp::Stack; | ||||||
| use log::{error, info}; | use log::{error, info}; | ||||||
| @@ -12,7 +12,7 @@ const UDP_TTL: Duration = Duration::from_secs(180); | |||||||
| async fn main() { | async fn main() { | ||||||
|     pretty_env_logger::init(); |     pretty_env_logger::init(); | ||||||
|  |  | ||||||
|     let matches = App::new("Phantun Server") |     let matches = Command::new("Phantun Server") | ||||||
|         .version(crate_version!()) |         .version(crate_version!()) | ||||||
|         .author("Datong Sun (github.com/dndx)") |         .author("Datong Sun (github.com/dndx)") | ||||||
|         .arg( |         .arg( | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user