Skip to content

Commit ce05ff5

Browse files
committed
auto merge of #19695 : arthurtw/rust/master, r=steveklabnik
2 parents 1eccb54 + 2f5e170 commit ce05ff5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/libgetopts/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
//!
3434
//! ```{.rust}
3535
//! extern crate getopts;
36-
//! use getopts::{optopt,optflag,getopts,OptGroup};
36+
//! use getopts::{optopt,optflag,getopts,OptGroup,usage};
3737
//! use std::os;
3838
//!
3939
//! fn do_work(inp: &str, out: Option<String>) {
@@ -44,10 +44,9 @@
4444
//! }
4545
//! }
4646
//!
47-
//! fn print_usage(program: &str, _opts: &[OptGroup]) {
48-
//! println!("Usage: {} [options]", program);
49-
//! println!("-o\t\tOutput");
50-
//! println!("-h --help\tUsage");
47+
//! fn print_usage(program: &str, opts: &[OptGroup]) {
48+
//! let brief = format!("Usage: {} [options]", program);
49+
//! print!("{}", usage(brief.as_slice(), opts));
5150
//! }
5251
//!
5352
//! fn main() {

0 commit comments

Comments
 (0)