Skip to content

Commit 11b4fea

Browse files
committed
---
yaml --- r: 14545 b: refs/heads/try c: 58e2083 h: refs/heads/master i: 14543: 1d9fe27 v: v3
1 parent 367083e commit 11b4fea

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 6c9527ab79ab66f3f8b8426e006cf58a447c0017
5+
refs/heads/try: 58e2083c0a79396c75b6b08ca2efb9a1116cfc2b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustdoc/rustdoc.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,22 @@ fn test_run_passes() {
9393
}
9494
}
9595

96-
fn main(argv: [str]) {
96+
fn main(args: [str]) {
9797

98-
if vec::contains(argv, "-h") {
98+
if vec::contains(args, "-h") {
9999
config::usage();
100100
ret;
101101
}
102102

103-
if vec::len(argv) != 2u {
104-
std::io::println(#fmt("usage: %s <input>", argv[0]));
103+
let config = alt config::parse_config(args) {
104+
result::ok(config) { config }
105+
result::err(err) {
106+
std::io::println(#fmt("error: %s", err));
105107
ret;
106-
}
108+
}
109+
};
107110

108-
let source_file = argv[1];
109-
run(source_file);
111+
run(config.input_crate);
110112
}
111113

112114
fn time<T>(what: str, f: fn() -> T) -> T {

0 commit comments

Comments
 (0)