[rust-dev] Pattern matching on std::os::args()

2014-04-20 Thread richo
o/ Rustlers, So, as an indirect result of the absence of pattern matching on unique vectors, I'm having a lot of trouble writing a sane CLI interface based on the results of os::args() The full code in a more readable format is available at here[1] So what I really want is something like:

Re: [rust-dev] Pattern matching on std::os::args()

2014-04-20 Thread Geoffroy Couprie
Hi, I encountered the same problem, and I wound up writing a library to solve it (instead of working on my original code): https://github.com/Geal/typedopts The basic idea is to define a Decoder that can work on command line options. Then you just need to add #[deriving(Decodable)] to a

Re: [rust-dev] Pattern matching on std::os::args()

2014-04-20 Thread richo
On 20/04/14 10:44 +0200, Geoffroy Couprie wrote: Hi, I encountered the same problem, and I wound up writing a library to solve it (instead of working on my original code): https://github.com/Geal/typedopts The basic idea is to define a Decoder that can work on command line options. Then you