@@ -101,11 +101,7 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
101
101
}
102
102
103
103
let matches =
104
- & match getopts:: getopts ( args_. iter ( )
105
- . map ( |x| x. to_owned ( ) )
106
- . collect :: < Vec < _ > > ( )
107
- . as_slice ( ) ,
108
- groups. as_slice ( ) ) {
104
+ & match getopts:: getopts ( args_. as_slice ( ) , groups. as_slice ( ) ) {
109
105
Ok ( m) => m,
110
106
Err ( f) => fail ! ( "{}" , f. to_err_msg( ) )
111
107
} ;
@@ -146,15 +142,18 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
146
142
build_base : opt_path ( matches, "build-base" ) ,
147
143
aux_base : opt_path ( matches, "aux-base" ) ,
148
144
stage_id : matches. opt_str ( "stage-id" ) . unwrap ( ) . to_strbuf ( ) ,
149
- mode : FromStr :: from_str ( matches. opt_str ( "mode" ) . unwrap ( ) ) . expect ( "invalid mode" ) ,
145
+ mode : FromStr :: from_str ( matches. opt_str ( "mode" )
146
+ . unwrap ( )
147
+ . as_slice ( ) ) . expect ( "invalid mode" ) ,
150
148
run_ignored : matches. opt_present ( "ignored" ) ,
151
149
filter : filter,
152
150
logfile : matches. opt_str ( "logfile" ) . map ( |s| Path :: new ( s) ) ,
153
151
save_metrics : matches. opt_str ( "save-metrics" ) . map ( |s| Path :: new ( s) ) ,
154
152
ratchet_metrics :
155
153
matches. opt_str ( "ratchet-metrics" ) . map ( |s| Path :: new ( s) ) ,
156
154
ratchet_noise_percent :
157
- matches. opt_str ( "ratchet-noise-percent" ) . and_then ( |s| from_str :: < f64 > ( s) ) ,
155
+ matches. opt_str ( "ratchet-noise-percent" )
156
+ . and_then ( |s| from_str :: < f64 > ( s. as_slice ( ) ) ) ,
158
157
runtool : matches. opt_str ( "runtool" ) . map ( |x| x. to_strbuf ( ) ) ,
159
158
host_rustcflags : matches. opt_str ( "host-rustcflags" )
160
159
. map ( |x| x. to_strbuf ( ) ) ,
0 commit comments