diff --git a/Cargo.toml b/Cargo.toml index 20ccede..7b3d129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,8 +57,7 @@ sodiumoxide = { version = "0.2", optional = true } byteorder = { version = "1.4", optional = true } [dev-dependencies] -clap = "3" -criterion = "0.3" +criterion = "0.5" serde = "1.0" serde_json = "1.0" serde_derive = "1.0" diff --git a/examples/simple.rs b/examples/simple.rs index 2290694..9098867 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -10,8 +10,6 @@ //! as `cargo run --example simple` to see the magic happen. use lazy_static::lazy_static; - -use clap::{arg, App}; use snow::{params::NoiseParams, Builder}; use std::{ io::{self, Read, Write}, @@ -25,9 +23,10 @@ lazy_static! { #[cfg(any(feature = "default-resolver", feature = "ring-accelerated"))] fn main() { - let matches = App::new("simple").arg(arg!("-s --server 'Server mode'")).get_matches(); + let server_mode = + std::env::args().next_back().map(|arg| arg == "-s" || arg == "--server").unwrap_or(true); - if matches.is_present("server") { + if server_mode { run_server(); } else { run_client();