Skip to content

Commit a4078bd

Browse files
committed
---
yaml --- r: 103915 b: refs/heads/try c: 968ce53 h: refs/heads/master i: 103913: c3344b6 103911: dd590b8 v: v3
1 parent d556741 commit a4078bd

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: 2ce7019b8791b11283495493e1db45735480d9b2
5+
refs/heads/try: 968ce53dff7da4ca258c67436b81b00bd55222e6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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)