@@ -221,31 +221,31 @@ fn build(
221221 // Build the list of arguments to pass to 'cargo build'. We will always
222222 // explicitly state the target, as it must be provided as either a command-line
223223 // argument or in the cargo config file.
224- let mut args = vec ! [ "--target" , target] ;
224+ let mut args = vec ! [ "--target" . to_string ( ) , target. to_string ( ) ] ;
225225
226226 if build_options. release {
227- args. push ( "--release" ) ;
227+ args. push ( "--release" . to_string ( ) ) ;
228228 }
229229
230- if let Some ( example) = build_options. example . as_deref ( ) {
231- args. push ( "--example" ) ;
232- args. push ( example) ;
230+ if let Some ( example) = & build_options. example {
231+ args. push ( "--example" . to_string ( ) ) ;
232+ args. push ( example. to_string ( ) ) ;
233233 }
234234
235- if let Some ( package) = build_options. package . as_deref ( ) {
236- args. push ( "--package" ) ;
237- args. push ( package) ;
235+ if let Some ( package) = & build_options. package {
236+ args. push ( "--package" . to_string ( ) ) ;
237+ args. push ( package. to_string ( ) ) ;
238238 }
239239
240- if let Some ( features) = build_options. features . as_deref ( ) {
241- args. push ( "--features" ) ;
242- args. extend ( features. iter ( ) . map ( |f| f . as_str ( ) ) ) ;
240+ if let Some ( features) = & build_options. features {
241+ args. push ( "--features" . to_string ( ) ) ;
242+ args. push ( features. join ( "," ) ) ;
243243 }
244244
245- if let Some ( unstable) = build_options. unstable . as_deref ( ) {
245+ if let Some ( unstable) = & build_options. unstable {
246246 for item in unstable. iter ( ) {
247- args. push ( "-Z" ) ;
248- args. push ( item) ;
247+ args. push ( "-Z" . to_string ( ) ) ;
248+ args. push ( item. to_string ( ) ) ;
249249 }
250250 }
251251
0 commit comments