File tree 3 files changed +16
-19
lines changed
crates/cargo-test-support/src
3 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ pub fn panic_error(what: &str, err: impl Into<anyhow::Error>) -> ! {
59
59
fn pe ( what : & str , err : anyhow:: Error ) -> ! {
60
60
let mut result = format ! ( "{}\n error: {}" , what, err) ;
61
61
for cause in err. chain ( ) . skip ( 1 ) {
62
- drop ( writeln ! ( result, "\n Caused by:" ) ) ;
63
- drop ( write ! ( result, "{}" , cause) ) ;
62
+ let _ = writeln ! ( result, "\n Caused by:" ) ;
63
+ let _ = write ! ( result, "{}" , cause) ;
64
64
}
65
65
panic ! ( "\n {}" , result) ;
66
66
}
Original file line number Diff line number Diff line change @@ -1045,10 +1045,10 @@ impl<'cfg> DrainState<'cfg> {
1045
1045
if fixable > 1 {
1046
1046
suggestions. push_str ( "s" )
1047
1047
}
1048
- drop ( write ! (
1048
+ let _ = write ! (
1049
1049
message,
1050
1050
" (run `{command} --{args}` to apply {suggestions})"
1051
- ) )
1051
+ ) ;
1052
1052
}
1053
1053
}
1054
1054
}
Original file line number Diff line number Diff line change @@ -585,19 +585,19 @@ impl Features {
585
585
feature_name, feature. version
586
586
) ;
587
587
if self . is_local {
588
- drop ( writeln ! (
588
+ let _ = writeln ! (
589
589
msg,
590
590
"Remove the feature from Cargo.toml to remove this error."
591
- ) ) ;
591
+ ) ;
592
592
} else {
593
- drop ( writeln ! (
593
+ let _ = writeln ! (
594
594
msg,
595
595
"This package cannot be used with this version of Cargo, \
596
596
as the unstable feature `{}` is no longer supported.",
597
597
feature_name
598
- ) ) ;
598
+ ) ;
599
599
}
600
- drop ( writeln ! ( msg, "{}" , see_docs( ) ) ) ;
600
+ let _ = writeln ! ( msg, "{}" , see_docs( ) ) ;
601
601
bail ! ( msg) ;
602
602
}
603
603
}
@@ -629,32 +629,29 @@ impl Features {
629
629
630
630
if self . nightly_features_allowed {
631
631
if self . is_local {
632
- drop ( writeln ! (
632
+ let _ = writeln ! (
633
633
msg,
634
634
"Consider adding `cargo-features = [\" {}\" ]` \
635
635
to the top of Cargo.toml (above the [package] table) \
636
636
to tell Cargo you are opting in to use this unstable feature.",
637
637
feature_name
638
- ) ) ;
638
+ ) ;
639
639
} else {
640
- drop ( writeln ! (
641
- msg,
642
- "Consider trying a more recent nightly release."
643
- ) ) ;
640
+ let _ = writeln ! ( msg, "Consider trying a more recent nightly release." ) ;
644
641
}
645
642
} else {
646
- drop ( writeln ! (
643
+ let _ = writeln ! (
647
644
msg,
648
645
"Consider trying a newer version of Cargo \
649
646
(this may require the nightly release)."
650
- ) ) ;
647
+ ) ;
651
648
}
652
- drop ( writeln ! (
649
+ let _ = writeln ! (
653
650
msg,
654
651
"See https://doc.rust-lang.org/nightly/cargo/{} for more information \
655
652
about the status of this feature.",
656
653
feature. docs
657
- ) ) ;
654
+ ) ;
658
655
659
656
bail ! ( "{}" , msg) ;
660
657
}
You can’t perform that action at this time.
0 commit comments