!31 fix clippy prompt errorand fix a println wrong format
From: @si-gui Reviewed-by: @genedna Signed-off-by: @genedna
This commit is contained in:
commit
517b3a747b
30
cargo-help-clippy-should-have-description-to-user.patch
Normal file
30
cargo-help-clippy-should-have-description-to-user.patch
Normal file
@ -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
|
||||||
|
@@ -92,7 +92,12 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'"
|
||||||
|
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);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
25
clippy-driver-usage-should-user-friendly.patch
Normal file
25
clippy-driver-usage-should-user-friendly.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 1062e11170d93df3c53b01c1a630a7151af3a003 Mon Sep 17 00:00:00 2001
|
||||||
|
From: si-gui <sunguoshuai@huawei.com>
|
||||||
|
Date: Wed, 23 Jun 2021 14:36:09 +0800
|
||||||
|
Subject: [PATCH] clippy-driver usage should user friendly
|
||||||
|
|
||||||
|
---
|
||||||
|
src/tools/clippy/src/driver.rs | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs
|
||||||
|
index f5f6c09e..7af74f15 100644
|
||||||
|
--- a/src/tools/clippy/src/driver.rs
|
||||||
|
+++ b/src/tools/clippy/src/driver.rs
|
||||||
|
@@ -95,7 +95,7 @@ fn display_help() {
|
||||||
|
Checks a package to catch common mistakes and improve your Rust code.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
- cargo clippy [options] [--] [<opts>...]
|
||||||
|
+ clippy-driver [options] [--] [<opts>...]
|
||||||
|
|
||||||
|
Common options:
|
||||||
|
-h, --help Print this message
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
25
fix-a-println-wrong-format.patch
Normal file
25
fix-a-println-wrong-format.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From edbb1b7011fe7bccf8a2efc71d806d61cd8e0c9b Mon Sep 17 00:00:00 2001
|
||||||
|
From: si-gui <sunguoshuai@huawei.com>
|
||||||
|
Date: Thu, 24 Jun 2021 20:15:14 +0800
|
||||||
|
Subject: [PATCH] fix a println wrong format
|
||||||
|
|
||||||
|
---
|
||||||
|
src/tools/cargo/src/bin/cargo/cli.rs | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/tools/cargo/src/bin/cargo/cli.rs b/src/tools/cargo/src/bin/cargo/cli.rs
|
||||||
|
index c2dd8785..9c240690 100644
|
||||||
|
--- a/src/tools/cargo/src/bin/cargo/cli.rs
|
||||||
|
+++ b/src/tools/cargo/src/bin/cargo/cli.rs
|
||||||
|
@@ -94,7 +94,7 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'"
|
||||||
|
} else {
|
||||||
|
if name.as_str() == "clippy" {
|
||||||
|
let summary = "Checks a package to catch common mistakes and improve your Rust code.";
|
||||||
|
- drop_println!(config, " {}", name, summary);
|
||||||
|
+ drop_println!(config, " {:<20} {}", name, summary);
|
||||||
|
} else {
|
||||||
|
drop_println!(config, " {}", name);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
17
rust.spec
17
rust.spec
@ -12,7 +12,7 @@
|
|||||||
%bcond_without lldb
|
%bcond_without lldb
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.51.0
|
Version: 1.51.0
|
||||||
Release: 1
|
Release: 4
|
||||||
Summary: The Rust Programming Language
|
Summary: The Rust Programming Language
|
||||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||||
URL: https://www.rust-lang.org
|
URL: https://www.rust-lang.org
|
||||||
@ -35,6 +35,9 @@ Patch0006: rustc-1.51.0-backport-pr81728.patch
|
|||||||
Patch0007: rustc-1.51.0-backport-pr83629.patch
|
Patch0007: rustc-1.51.0-backport-pr83629.patch
|
||||||
Patch0008: rustc-1.48.0-disable-libssh2.patch
|
Patch0008: rustc-1.48.0-disable-libssh2.patch
|
||||||
Patch0009: rustc-1.51.0-disable-http2.patch
|
Patch0009: rustc-1.51.0-disable-http2.patch
|
||||||
|
Patch0010: clippy-driver-usage-should-user-friendly.patch
|
||||||
|
Patch0011: cargo-help-clippy-should-have-description-to-user.patch
|
||||||
|
Patch0012: fix-a-println-wrong-format.patch
|
||||||
%{lua: function rust_triple(arch)
|
%{lua: function rust_triple(arch)
|
||||||
local abi = "gnu"
|
local abi = "gnu"
|
||||||
if arch == "armv7hl" then
|
if arch == "armv7hl" then
|
||||||
@ -254,6 +257,9 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
|
|||||||
rm -rf src/llvm-project/
|
rm -rf src/llvm-project/
|
||||||
mkdir -p src/llvm-project/libunwind/
|
mkdir -p src/llvm-project/libunwind/
|
||||||
%endif
|
%endif
|
||||||
|
%patch0010 -p1
|
||||||
|
%patch0011 -p1
|
||||||
|
%patch0012 -p1
|
||||||
rm -rf vendor/curl-sys/curl/
|
rm -rf vendor/curl-sys/curl/
|
||||||
rm -rf vendor/jemalloc-sys/jemalloc/
|
rm -rf vendor/jemalloc-sys/jemalloc/
|
||||||
rm -rf vendor/libssh2-sys/libssh2/
|
rm -rf vendor/libssh2-sys/libssh2/
|
||||||
@ -459,6 +465,15 @@ export %{rust_env}
|
|||||||
%{_mandir}/man1/cargo*.1*
|
%{_mandir}/man1/cargo*.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu 24 Jun 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-4
|
||||||
|
- fix a println wrong format
|
||||||
|
|
||||||
|
* Thu 24 Jun 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-3
|
||||||
|
- cargo help clippy should have description to user
|
||||||
|
|
||||||
|
* Wed 23 Jun 2021 sunguoshuai <sunguoshuai@huawei.com> - 1.51.0-2
|
||||||
|
- clippy-driver usage should user friendly
|
||||||
|
|
||||||
* Fri May 07 2021 wangyue <wangyue92@huawei.com> - 1.51.0-1
|
* Fri May 07 2021 wangyue <wangyue92@huawei.com> - 1.51.0-1
|
||||||
- Update to 1.51.0
|
- Update to 1.51.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user