You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is possible to pass an empty string to arguments defined like this (maybe it's a valid value to all of them):
Arg::new("from-stop").required(true)
On the command-line, it's now possible to pass in an empty string like so:
$ trains shortest-route A ""
I believe it's too far fetched to disallow empty strings in general, but it would be great if I could set a flag (maybe even it's default on) on the Arg type to let the parser handle empty values for me.
I have the initial work on this done, but I'm going to roll it into a larger update tonight since I don't have time to finish it until later today. I'll posy back later today once its complete ;)
Thanks! No reason to hurry though, as I am just playing it safe and used
'stdin' instead of '-' for the final toy project.
And Google.rs will use this capability once available.
On Sun 17 May 2015 at 19:04 Kevin K. [email protected] wrote:
I have the initial work on this done, but I'm going to roll it into a
larger update tonight since I don't have time to finish it until later
today. I'll posy back later today once its complete ;)
—
Reply to this email directly or view it on GitHub #122 (comment).
Currently it is possible to pass an empty string to arguments defined like this (maybe it's a valid value to all of them):
On the command-line, it's now possible to pass in an empty string like so:
$ trains shortest-route A ""
I believe it's too far fetched to disallow empty strings in general, but it would be great if I could set a flag (maybe even it's default on) on the
Arg
type to let the parser handle empty values for me.This could look like this:
If such a feature does not exist on parser level, each client will have to implement its own check.
The text was updated successfully, but these errors were encountered: