Skip to content

Commit ff7ecca

Browse files
committedJan 10, 2014
auto merge of #11452 : derekchiang/rust/fix-11421, r=cmr
Closes #11421. A pretty trivial fix.
2 parents 7fe8692 + 6f875c9 commit ff7ecca

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎src/librustdoc/lib.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -109,7 +109,13 @@ pub fn usage(argv0: &str) {
109109
}
110110

111111
pub fn main_args(args: &[~str]) -> int {
112-
let matches = groups::getopts(args.tail(), opts()).unwrap();
112+
let matches = match groups::getopts(args.tail(), opts()) {
113+
Ok(m) => m,
114+
Err(err) => {
115+
println(err.to_err_msg());
116+
return 1;
117+
}
118+
};
113119
if matches.opt_present("h") || matches.opt_present("help") {
114120
usage(args[0]);
115121
return 0;

0 commit comments

Comments
 (0)
Please sign in to comment.