Closed MggMuggins closed 4 years ago
Thanks! Not having to worry about tedious arg parsing for future options is quite helpful :)
I think the error variants is not too important right now. It would of course be nice but it's just polishing.
Yeah, that's what I figured. Do ping me if it ever gets to a point when that would be required.
I'm not sure if this is really much better than it was before, it would be handy for the parse_args func to do all the validation and pass back a consistent error type with a possibility for some other errors wrapped up in some of the variants.
I ran the tests (not sure if they use the arg parsing or not :D), and tested with a couple of arg combos and it seems to work.
Regardless of caveats, feel free to merge or close this PR, pico-args is just one option for arg-parsing. This code could also use improvement, I'm happy to incorporate feedback.