diff --git a/Cargo.toml b/Cargo.toml index 6d56e0fcb6e..df31c2af644 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,13 +27,12 @@ maintenance = {status = "actively-developed"} bitflags = "1.0" unicode-width = "0.1.4" textwrap = "0.10.0" -strsim = { version = "0.8", optional = true } -yaml-rust = { version = "0.4.2", optional = true } -linked-hash-map = { version = ">=0.0.9, <0.6", optional = true } -clippy = { version = "~0.0.166", optional = true } -atty = { version = "0.2.2", optional = true } -vec_map = { version = "0.8", optional = true } -term_size = { version = "0.3.0", optional = true } +strsim = { version = "0.8", optional = true } +yaml-rust = { version = "0.3.5", optional = true } +clippy = { version = "~0.0.166", optional = true } +atty = { version = "0.2.2", optional = true } +vec_map = { version = "0.8", optional = true } +term_size = { version = "0.3.0", optional = true } [target.'cfg(not(windows))'.dependencies] ansi_term = { version = "0.11", optional = true } @@ -49,7 +48,7 @@ default = ["suggestions", "color", "vec_map"] suggestions = ["strsim"] color = ["ansi_term", "atty"] wrap_help = ["term_size", "textwrap/term_size"] -yaml = ["yaml-rust", "linked-hash-map"] +yaml = ["yaml-rust"] unstable = [] # for building with unstable clap features (doesn't require nightly Rust) (currently none) nightly = [] # for building with unstable Rust features (currently none) lints = ["clippy"] # Requires nightly Rust diff --git a/src/args/arg.rs b/src/args/arg.rs index 845b4b21b2e..50a30abb7ac 100644 --- a/src/args/arg.rs +++ b/src/args/arg.rs @@ -1,5 +1,5 @@ #[cfg(feature = "yaml")] -use linked_hash_map::LinkedHashMap; +use std::collections::BTreeMap; use std::rc::Rc; use std::ffi::{OsStr, OsString}; #[cfg(any(target_os = "windows", target_arch = "wasm32"))] @@ -91,7 +91,7 @@ impl<'a, 'b> Arg<'a, 'b> { /// ``` /// [`Arg`]: ./struct.Arg.html #[cfg(feature = "yaml")] - pub fn from_yaml(y: &LinkedHashMap) -> Arg { + pub fn from_yaml(y: &BTreeMap) -> Arg { // We WANT this to panic on error...so expect() is good. let name_yml = y.keys().nth(0).unwrap(); let name_str = name_yml.as_str().unwrap(); diff --git a/src/args/group.rs b/src/args/group.rs index 26164c2db46..f8bfb7a0864 100644 --- a/src/args/group.rs +++ b/src/args/group.rs @@ -1,5 +1,5 @@ #[cfg(feature = "yaml")] -use linked_hash_map::LinkedHashMap; +use std::collections::BTreeMap; use std::fmt::{Debug, Formatter, Result}; #[cfg(feature = "yaml")] @@ -454,8 +454,8 @@ impl<'a, 'z> From<&'z ArgGroup<'a>> for ArgGroup<'a> { } #[cfg(feature = "yaml")] -impl<'a> From<&'a LinkedHashMap> for ArgGroup<'a> { - fn from(b: &'a LinkedHashMap) -> Self { +impl<'a> From<&'a BTreeMap> for ArgGroup<'a> { + fn from(b: &'a BTreeMap) -> Self { // We WANT this to panic on error...so expect() is good. let mut a = ArgGroup::default(); let group_settings = if b.len() == 1 { diff --git a/src/lib.rs b/src/lib.rs index 87abc737fef..a5be32e6685 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -548,8 +548,6 @@ extern crate unicode_width; extern crate vec_map; #[cfg(feature = "yaml")] extern crate yaml_rust; -#[cfg(feature = "yaml")] -extern crate linked_hash_map; #[cfg(feature = "yaml")] pub use yaml_rust::YamlLoader;