Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Upgrading yaml-rust to 0.4.2" #1439

Merged
merged 1 commit into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/args/arg.rs
Original file line number Diff line number Diff line change
@@ -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"))]
Expand Down Expand Up @@ -91,7 +91,7 @@ impl<'a, 'b> Arg<'a, 'b> {
/// ```
/// [`Arg`]: ./struct.Arg.html
#[cfg(feature = "yaml")]
pub fn from_yaml(y: &LinkedHashMap<Yaml, Yaml>) -> Arg {
pub fn from_yaml(y: &BTreeMap<Yaml, Yaml>) -> 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();
Expand Down
6 changes: 3 additions & 3 deletions src/args/group.rs
Original file line number Diff line number Diff line change
@@ -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")]
Expand Down Expand Up @@ -454,8 +454,8 @@ impl<'a, 'z> From<&'z ArgGroup<'a>> for ArgGroup<'a> {
}

#[cfg(feature = "yaml")]
impl<'a> From<&'a LinkedHashMap<Yaml, Yaml>> for ArgGroup<'a> {
fn from(b: &'a LinkedHashMap<Yaml, Yaml>) -> Self {
impl<'a> From<&'a BTreeMap<Yaml, Yaml>> for ArgGroup<'a> {
fn from(b: &'a BTreeMap<Yaml, Yaml>) -> Self {
// We WANT this to panic on error...so expect() is good.
let mut a = ArgGroup::default();
let group_settings = if b.len() == 1 {
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down