Skip to content

Commit ecc2e61

Browse files
committed
---
yaml --- r: 148937 b: refs/heads/try2 c: 968ce53 h: refs/heads/master i: 148935: 155e4cd v: v3
1 parent 6a05c74 commit ecc2e61

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 2ce7019b8791b11283495493e1db45735480d9b2
8+
refs/heads/try2: 968ce53dff7da4ca258c67436b81b00bd55222e6
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libgetopts/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//!
3232
//! ~~~{.rust}
3333
//! extern mod getopts;
34-
//! use getopts::{optopt,optflag,getopts,Opt};
34+
//! use getopts::{optopt,optflag,getopts,OptGroup};
3535
//! use std::os;
3636
//!
3737
//! fn do_work(inp: &str, out: Option<~str>) {
@@ -42,7 +42,7 @@
4242
//! }
4343
//! }
4444
//!
45-
//! fn print_usage(program: &str, _opts: &[Opt]) {
45+
//! fn print_usage(program: &str, _opts: &[OptGroup]) {
4646
//! println!("Usage: {} [options]", program);
4747
//! println!("-o\t\tOutput");
4848
//! println!("-h --help\tUsage");
@@ -54,15 +54,14 @@
5454
//! let program = args[0].clone();
5555
//!
5656
//! let opts = ~[
57-
//! optopt("o"),
58-
//! optflag("h"),
59-
//! optflag("help")
57+
//! optopt("o", "", "set output file name", "NAME"),
58+
//! optflag("h", "help", "print this help menu")
6059
//! ];
6160
//! let matches = match getopts(args.tail(), opts) {
6261
//! Ok(m) => { m }
6362
//! Err(f) => { fail!(f.to_err_msg()) }
6463
//! };
65-
//! if matches.opt_present("h") || matches.opt_present("help") {
64+
//! if matches.opt_present("h") {
6665
//! print_usage(program, opts);
6766
//! return;
6867
//! }

0 commit comments

Comments
 (0)