File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: 6c9527ab79ab66f3f8b8426e006cf58a447c0017
5
+ refs/heads/try: 58e2083c0a79396c75b6b08ca2efb9a1116cfc2b
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -93,20 +93,22 @@ fn test_run_passes() {
93
93
}
94
94
}
95
95
96
- fn main ( argv : [ str ] ) {
96
+ fn main ( args : [ str ] ) {
97
97
98
- if vec:: contains ( argv , "-h" ) {
98
+ if vec:: contains ( args , "-h" ) {
99
99
config:: usage ( ) ;
100
100
ret;
101
101
}
102
102
103
- if vec:: len ( argv) != 2 u {
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) ) ;
105
107
ret;
106
- }
108
+ }
109
+ } ;
107
110
108
- let source_file = argv[ 1 ] ;
109
- run ( source_file) ;
111
+ run ( config. input_crate ) ;
110
112
}
111
113
112
114
fn time < T > ( what : str , f : fn ( ) -> T ) -> T {
You can’t perform that action at this time.
0 commit comments