summaryrefslogtreecommitdiff
path: root/cargo-help-clippy-should-have-description-to-user.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-11-02 06:13:23 +0000
committerCoprDistGit <infra@openeuler.org>2023-11-02 06:13:23 +0000
commit6a77bd576366713a4f394dcef5f331625315eaa2 (patch)
treef827420c5c0a85f23cfd180b7530d1238a3d3c16 /cargo-help-clippy-should-have-description-to-user.patch
parent56068bef259895fe462efdf0f9faf1c9ab6271a4 (diff)
automatic import of rustopeneuler20.03_LTS_SP1
Diffstat (limited to 'cargo-help-clippy-should-have-description-to-user.patch')
-rw-r--r--cargo-help-clippy-should-have-description-to-user.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/cargo-help-clippy-should-have-description-to-user.patch b/cargo-help-clippy-should-have-description-to-user.patch
new file mode 100644
index 0000000..5658c47
--- /dev/null
+++ b/cargo-help-clippy-should-have-description-to-user.patch
@@ -0,0 +1,30 @@
+From 4a2c2e81316960ffbcc3dc1c91758420d6db0a6e Mon Sep 17 00:00:00 2001
+From: si-gui <sunguoshuai@huawei.com>
+Date: Thu, 24 Jun 2021 16:35:12 +0800
+Subject: [PATCH] cargo help clippy should have description to user
+
+---
+ src/tools/cargo/src/bin/cargo/cli.rs | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/tools/cargo/src/bin/cargo/cli.rs b/src/tools/cargo/src/bin/cargo/cli.rs
+index 243f6ac0..c2dd8785 100644
+--- a/src/tools/cargo/src/bin/cargo/cli.rs
++++ b/src/tools/cargo/src/bin/cargo/cli.rs
+@@ -135,7 +135,12 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'",
+ } else if is_verbose {
+ drop_println!(config, " {:<20} {}", name, path.display());
+ } else {
+- drop_println!(config, " {}", name);
++ if name.as_str() == "clippy" {
++ let summary = "Checks a package to catch common mistakes and improve your Rust code.";
++ drop_println!(config, " {}", name, summary);
++ } else {
++ drop_println!(config, " {}", name);
++ }
+ }
+ }
+ CommandInfo::Alias { target } => {
+--
+2.30.0
+