function from_yaml
not found in Arg<'_>
#2566
Answered
by
pksunkara
dwisiswant0
asked this question in
Q&A
-
Please complete the following tasks
Rust Version1.53.0 (53cb7b09b 2021-06-17) Clap Version3.0.0-beta.2 Minimal reproducible codeuse {
clap::{
App, Arg,
load_yaml,
crate_authors,
crate_description,
crate_name,
crate_version
},
};
#[async_std::main]
async fn main() {
let yaml = load_yaml!("cli.yaml");
let args = Arg::from_yaml(yaml);
let matches = App::new(crate_name!())
.author(crate_authors!())
.about(crate_description!())
.name(crate_name!())
.version(crate_version!())
.arg(args)
.get_matches();
... Steps to reproduce the bug with the above codecargo run -- Actual BehaviourCan't call Expected BehaviourShould be able to use (according to documentation). Additional ContextNo response Debug OutputNo response |
Beta Was this translation helpful? Give feedback.
Answered by
pksunkara
Jun 29, 2021
Replies: 1 comment
-
I don't know where exactly you copied the code from, it's |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pksunkara
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't know where exactly you copied the code from, it's
from
notfrom_yaml
in 3.0*