Skip to content

is_present returns wrong args #2398

Answered by ldm0
theguy147 asked this question in Q&A
Discussion options

You must be logged in to vote

This is not a bug. The argument you defined is called positional arguments, which takes a value. I guess you want flags, you can try Arg::with_name("foo").long("foo"), Arg::with_name("bar").long("bar") and then use cargo run -- --bar

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by theguy147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2397 on March 09, 2021 16:32.