File tree Expand file tree Collapse file tree 3 files changed +16
-19
lines changed
crates/cargo-test-support/src Expand file tree Collapse file tree 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>) -> ! {
5959 fn pe ( what : & str , err : anyhow:: Error ) -> ! {
6060 let mut result = format ! ( "{}\n error: {}" , what, err) ;
6161 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) ;
6464 }
6565 panic ! ( "\n {}" , result) ;
6666 }
Original file line number Diff line number Diff line change @@ -1045,10 +1045,10 @@ impl<'cfg> DrainState<'cfg> {
10451045 if fixable > 1 {
10461046 suggestions. push_str ( "s" )
10471047 }
1048- drop ( write ! (
1048+ let _ = write ! (
10491049 message,
10501050 " (run `{command} --{args}` to apply {suggestions})"
1051- ) )
1051+ ) ;
10521052 }
10531053 }
10541054 }
Original file line number Diff line number Diff line change @@ -585,19 +585,19 @@ impl Features {
585585 feature_name, feature. version
586586 ) ;
587587 if self . is_local {
588- drop ( writeln ! (
588+ let _ = writeln ! (
589589 msg,
590590 "Remove the feature from Cargo.toml to remove this error."
591- ) ) ;
591+ ) ;
592592 } else {
593- drop ( writeln ! (
593+ let _ = writeln ! (
594594 msg,
595595 "This package cannot be used with this version of Cargo, \
596596 as the unstable feature `{}` is no longer supported.",
597597 feature_name
598- ) ) ;
598+ ) ;
599599 }
600- drop ( writeln ! ( msg, "{}" , see_docs( ) ) ) ;
600+ let _ = writeln ! ( msg, "{}" , see_docs( ) ) ;
601601 bail ! ( msg) ;
602602 }
603603 }
@@ -629,32 +629,29 @@ impl Features {
629629
630630 if self . nightly_features_allowed {
631631 if self . is_local {
632- drop ( writeln ! (
632+ let _ = writeln ! (
633633 msg,
634634 "Consider adding `cargo-features = [\" {}\" ]` \
635635 to the top of Cargo.toml (above the [package] table) \
636636 to tell Cargo you are opting in to use this unstable feature.",
637637 feature_name
638- ) ) ;
638+ ) ;
639639 } 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." ) ;
644641 }
645642 } else {
646- drop ( writeln ! (
643+ let _ = writeln ! (
647644 msg,
648645 "Consider trying a newer version of Cargo \
649646 (this may require the nightly release)."
650- ) ) ;
647+ ) ;
651648 }
652- drop ( writeln ! (
649+ let _ = writeln ! (
653650 msg,
654651 "See https://doc.rust-lang.org/nightly/cargo/{} for more information \
655652 about the status of this feature.",
656653 feature. docs
657- ) ) ;
654+ ) ;
658655
659656 bail ! ( "{}" , msg) ;
660657 }
You can’t perform that action at this time.
0 commit comments