tests(v2): updating yaml tests to new v2 base

This commit is contained in:
Kevin K 2016-01-24 09:24:15 -05:00
parent 0410873d8d
commit d707fa0fad
3 changed files with 4 additions and 3 deletions

View file

@ -87,7 +87,8 @@ impl<'a, 'b> App<'a, 'b> {
/// let app = App::from_yaml(yml);
/// ```
#[cfg(feature = "yaml")]
pub fn from_yaml<'y>(mut yaml: &'y Yaml) -> App<'y, 'y, 'y, 'y, 'y, 'y> {
pub fn from_yaml<'y>(mut yaml: &'y Yaml) -> App<'y, 'y> {
use args::SubCommand;
// We WANT this to panic on error...so expect() is good.
let mut is_sc = None;
let mut a = if let Some(name) = yaml["name"].as_str() {

View file

@ -159,7 +159,7 @@ impl<'a, 'b> Arg<'a, 'b> {
/// let arg = Arg::from_yaml(yml);
/// ```
#[cfg(feature = "yaml")]
pub fn from_yaml<'y>(y: &'y BTreeMap<Yaml, Yaml>) -> Arg<'y> {
pub fn from_yaml<'y>(y: &'y BTreeMap<Yaml, Yaml>) -> Arg<'y, 'y> {
// 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();

View file

@ -57,7 +57,7 @@ impl<'a> SubCommand<'a> {
/// let sc = SubCommand::from_yaml(sc_yaml);
/// ```
#[cfg(feature = "yaml")]
pub fn from_yaml<'y>(yaml: &'y Yaml) -> App<'y> {
pub fn from_yaml<'y>(yaml: &'y Yaml) -> App<'y, 'y> {
App::from_yaml(yaml)
}
}