you can replace the `let opts = …` dance you do for printing with `opts @ …` in front of the pattern IIRC (and also write the pattern on one line but rustfmt might disagree)
Dear rust devs on twitter, is there a better way to do this? This seems... verbose lol. But still better than what most of my CLIs with subcommands look like :P https://github.com/yoshuawuyts/playground-structopt/blob/master/src/main.rs#L35-L69 …
-
-
-
Oh and you can use doc comments (`/// foo`) instead of `about = "foo"`!
- 3 more replies
New conversation -
-
-
Good excuse to try out structopt! I don't think you need the `opts @` syntax (or at least I couldn't get it to work). Also putting enum contents in the match seemed a bit cluttered. Best I got to:https://gist.github.com/gibfahn/f4f20ffa41a47787a1a0c1b64a0147ba …
-
Nice!
End of conversation
New conversation -
-
-
why not use a crate? clap is pretty good
-
Haha, I am using a crate here — wraps around clap

- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.