diff --git a/Cargo.toml b/Cargo.toml index dcbcb0cd..b3b6aff3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ ark-serialize = "0.3.0" async-std = { version = "1.8.0", features = ["attributes"] } async-trait = "0.1.51" bincode = "1.3.3" -clap = { version = "3.2.5", features = ["derive"] } +clap = { version = "4.0", features = ["derive"] } config = "0.13.1" derive_more = "0.99" dirs = "4.0.0" @@ -42,7 +42,7 @@ snafu = { version = "0.7", features = ["backtraces"] } strum = "0.20" strum_macros = "0.20.1" surf = "2.3.2" -tagged-base64 = { git = "https://github.com/EspressoSystems/tagged-base64.git", tag = "0.2.0" } +tagged-base64 = { git = "https://github.com/EspressoSystems/tagged-base64.git", tag = "0.2.1" } tide = { version = "0.16.0", default-features = false } tide-websockets = "0.4.0" toml = "0.5" diff --git a/src/lib.rs b/src/lib.rs index 4a00908b..0152290d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -237,7 +237,7 @@ use crate::ApiKey::*; use async_std::sync::{Arc, RwLock}; use async_std::task::sleep; -use clap::{CommandFactory, Parser}; +use clap::CommandFactory; use config::{Config, ConfigError}; use routefinder::Router; use serde::Deserialize; @@ -281,7 +281,7 @@ pub const SERVER_STARTUP_RETRIES: u64 = 255; /// Number of milliseconds to sleep between attempts pub const SERVER_STARTUP_SLEEP_MS: u64 = 100; -#[derive(Parser, Debug)] +#[derive(clap::Args, Debug)] #[clap(author, version, about, long_about = None)] pub struct DiscoArgs { #[clap(long)] @@ -544,8 +544,8 @@ fn get_cmd_line_map() -> config::Environment { let mut cla = HashMap::new(); let matches = Args::command().get_matches(); for arg in Args::command().get_arguments() { - if let Some(value) = matches.get_one::(arg.get_id()) { - let key = arg.get_id().replace('-', "_"); + if let Some(value) = matches.get_one::(arg.get_id().as_str()) { + let key = arg.get_id().as_str().replace('-', "_"); cla.insert(key, value.to_owned()); } }