1 Star 0 Fork 67

mc964203886/rust

forked from src-openEuler/rust 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cargo-help-clippy-should-have-description-to-user.patch 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
sdlzx 提交于 2021-12-18 10:58 . Update to 1.56.0
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
@@ -92,7 +92,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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mc964203886/rust.git
git@gitee.com:mc964203886/rust.git
mc964203886
rust
rust
master

搜索帮助