mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
tests(v2): updating yaml tests to new v2 base
This commit is contained in:
parent
0410873d8d
commit
d707fa0fad
3 changed files with 4 additions and 3 deletions
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue