[rust-dev] Is it just me, or do the API docs lie about getopt() in rust v0.8?

Andrew Pennebaker andrew.pennebaker at gmail.com
Mon Jan 13 16:48:53 PST 2014


I'm following tutorials and snippets to get my code to work with rust 0.8
(I'm behind, I know).

The rust docs for v0.8 say that getopt() accepts an array of OptGroup (long
options), and my code is written to use that.

http://static.rust-lang.org/doc/0.8/extra/getopts/groups/fn.getopts.html

But when I dig through the rust source code around version 0.8, this is not
the API that I find.

https://github.com/mozilla/rust/blob/7c92435f8f93344330e47fb0cca4f79297896bd2/src/libextra/getopts.rs#L396

Am I doing something wrong?

What's the easiest way to convert an array of long options into an array of
short options for the purposes of using getopt()?

Is this discrepancy fixed in 0.9?

-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140113/01098ca2/attachment-0001.html>


More information about the Rust-dev mailing list