-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12136 - loongarch-rs:useless-drop, r=hi-rustin
Remove useless drop of copy type ### What does this PR try to resolve? This PR aims to remove useless drop of copy type to clear warnings that reported after rust-lang/rust#109732 ``` warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing --> src/cargo/core/compiler/job_queue/mod.rs:1048:21 | 1048 | drop(write!( | ______________________^____- | | _____________________| | || 1049 | || message, 1050 | || " (run `{command} --{args}` to apply {suggestions})" 1051 | || )) | ||_____________________-^ | |______________________| | argument has type `Result<(), std::fmt::Error>` | = note: use `let _ = ...` to ignore the expression or result = note: `#[warn(drop_copy)]` on by default ``` ### How should we test and review this PR? ```bash cargo build && cargo test # without any warnings ``` ### Additional information None
- Loading branch information
Showing
3 changed files
with
16 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters