@@ -100,7 +100,7 @@ impl Context {
100
100
}
101
101
102
102
fn from_target_name ( target_name : & str ) -> Result < Self > {
103
- let cfg = Cfg :: of ( target_name) . map_err ( |e| e . compat ( ) ) ?;
103
+ let cfg = Cfg :: of ( target_name) ?;
104
104
105
105
Ok ( Context {
106
106
cfg,
@@ -324,7 +324,7 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
324
324
if arch_name == "thumb" {
325
325
// `-arch-name=thumb` doesn't produce the right output so instead we pass
326
326
// `-triple=$target`, which contains more information about the target
327
- lltool. args ( & [ "--triple" , & ctxt. target ] ) ;
327
+ lltool. args ( [ "--triple" , & ctxt. target ] ) ;
328
328
} else {
329
329
lltool. args ( & [ format ! ( "--arch-name={}" , arch_name) ] ) ;
330
330
}
@@ -391,7 +391,7 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
391
391
Tool :: Size => postprocess:: size ( & output. stdout ) ,
392
392
} ;
393
393
394
- stdout. write_all ( & * processed_output) ?;
394
+ stdout. write_all ( & processed_output) ?;
395
395
396
396
if output. status . success ( ) {
397
397
Ok ( 0 )
@@ -474,19 +474,19 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
474
474
}
475
475
476
476
let build_type = if matches. is_present ( "lib" ) {
477
- cargo. args ( & [ "--lib" ] ) ;
477
+ cargo. args ( [ "--lib" ] ) ;
478
478
BuildType :: Lib
479
479
} else if let Some ( bin_name) = matches. value_of ( "bin" ) {
480
- cargo. args ( & [ "--bin" , bin_name] ) ;
480
+ cargo. args ( [ "--bin" , bin_name] ) ;
481
481
BuildType :: Bin ( bin_name)
482
482
} else if let Some ( example_name) = matches. value_of ( "example" ) {
483
- cargo. args ( & [ "--example" , example_name] ) ;
483
+ cargo. args ( [ "--example" , example_name] ) ;
484
484
BuildType :: Example ( example_name)
485
485
} else if let Some ( test_name) = matches. value_of ( "test" ) {
486
- cargo. args ( & [ "--test" , test_name] ) ;
486
+ cargo. args ( [ "--test" , test_name] ) ;
487
487
BuildType :: Test ( test_name)
488
488
} else if let Some ( bench_name) = matches. value_of ( "bench" ) {
489
- cargo. args ( & [ "--bench" , bench_name] ) ;
489
+ cargo. args ( [ "--bench" , bench_name] ) ;
490
490
BuildType :: Bench ( bench_name)
491
491
} else {
492
492
BuildType :: Any
@@ -503,7 +503,7 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
503
503
504
504
if let Some ( features) = matches. values_of ( "features" ) {
505
505
for feature in features {
506
- cargo. args ( & [ "--features" , feature] ) ;
506
+ cargo. args ( [ "--features" , feature] ) ;
507
507
}
508
508
}
509
509
if matches. is_present ( "no-default-features" ) {
@@ -516,7 +516,7 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
516
516
// NOTE we do *not* use `project.target()` here because Cargo will figure things out on
517
517
// its own (i.e. it will search and parse .cargo/config, etc.)
518
518
if let Some ( target) = matches. value_of ( "target" ) {
519
- cargo. args ( & [ "--target" , target] ) ;
519
+ cargo. args ( [ "--target" , target] ) ;
520
520
}
521
521
522
522
let verbose = matches. occurrences_of ( "verbose" ) ;
@@ -541,9 +541,9 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches<'a>, cargo: &mut Command) -> (Bu
541
541
cargo. arg ( "--offline" ) ;
542
542
}
543
543
544
- if let Some ( unstable_features) = matches. values_of ( "Z " ) {
544
+ if let Some ( unstable_features) = matches. values_of ( "unstable-features " ) {
545
545
for unstable_feature in unstable_features {
546
- cargo. args ( & [ "-Z" , unstable_feature] ) ;
546
+ cargo. args ( [ "-Z" , unstable_feature] ) ;
547
547
}
548
548
}
549
549
0 commit comments