aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2018-04-15 14:30:06 +0200
committerTeddy Wing2018-04-15 14:30:06 +0200
commit9718d2477026b4695a508bd40097b54f8ca6768e (patch)
tree07644fb05bdc2a5af063425b8f84a65318f37ad2 /src/lib.rs
parentfc614ba9d8e60e11f15fcfb883b27e3f3cf010b3 (diff)
downloadmeetup-find-events-rss-9718d2477026b4695a508bd40097b54f8ca6768e.tar.bz2
Always print help message if `-h` or `--help` flags passed
Since we've set up required arguments, 'getopts' fails fast and complains about missing required args even if the only one used was `-h` or `--help`. Why should you care about required arguments? You wanted help in the first place, how are you going to know? Thankfully, this message from 'prasannavl' pointed me in the right direction: https://github.com/rust-lang-nursery/getopts/issues/46#issuecomment-343842947 If there's an option parse failure, we can just look for the help flags in the args vec to see if we should display the help.
Diffstat (limited to 'src/lib.rs')
0 files changed, 0 insertions, 0 deletions