Skip to content

Commit 587012b

Browse files
committed
fix clippy::unneeded-struct-pattern
1 parent 5a89237 commit 587012b

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Diff for: src/bootstrap/src/core/build_steps/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl Step for Std {
6969
);
7070

7171
std_cargo(builder, target, compiler.stage, &mut cargo);
72-
if matches!(builder.config.cmd, Subcommand::Fix { .. }) {
72+
if matches!(builder.config.cmd, Subcommand::Fix) {
7373
// By default, cargo tries to fix all targets. Tell it not to fix tests until we've added `test` to the sysroot.
7474
cargo.arg("--lib");
7575
}

Diff for: src/bootstrap/src/core/config/config.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -2330,21 +2330,21 @@ impl Config {
23302330
Subcommand::Doc { .. } => {
23312331
flags.stage.or(doc_stage).unwrap_or(if download_rustc { 2 } else { 0 })
23322332
}
2333-
Subcommand::Build { .. } => {
2333+
Subcommand::Build => {
23342334
flags.stage.or(build_stage).unwrap_or(if download_rustc { 2 } else { 1 })
23352335
}
23362336
Subcommand::Test { .. } | Subcommand::Miri { .. } => {
23372337
flags.stage.or(test_stage).unwrap_or(if download_rustc { 2 } else { 1 })
23382338
}
23392339
Subcommand::Bench { .. } => flags.stage.or(bench_stage).unwrap_or(2),
2340-
Subcommand::Dist { .. } => flags.stage.or(dist_stage).unwrap_or(2),
2341-
Subcommand::Install { .. } => flags.stage.or(install_stage).unwrap_or(2),
2340+
Subcommand::Dist => flags.stage.or(dist_stage).unwrap_or(2),
2341+
Subcommand::Install => flags.stage.or(install_stage).unwrap_or(2),
23422342
Subcommand::Perf { .. } => flags.stage.unwrap_or(1),
23432343
// These are all bootstrap tools, which don't depend on the compiler.
23442344
// The stage we pass shouldn't matter, but use 0 just in case.
23452345
Subcommand::Clean { .. }
23462346
| Subcommand::Clippy { .. }
2347-
| Subcommand::Fix { .. }
2347+
| Subcommand::Fix
23482348
| Subcommand::Run { .. }
23492349
| Subcommand::Setup { .. }
23502350
| Subcommand::Format { .. }
@@ -2359,10 +2359,10 @@ impl Config {
23592359
Subcommand::Test { .. }
23602360
| Subcommand::Miri { .. }
23612361
| Subcommand::Doc { .. }
2362-
| Subcommand::Build { .. }
2362+
| Subcommand::Build
23632363
| Subcommand::Bench { .. }
2364-
| Subcommand::Dist { .. }
2365-
| Subcommand::Install { .. } => {
2364+
| Subcommand::Dist
2365+
| Subcommand::Install => {
23662366
assert_eq!(
23672367
config.stage, 2,
23682368
"x.py should be run with `--stage 2` on CI, but was run with `--stage {}`",
@@ -2372,7 +2372,7 @@ impl Config {
23722372
Subcommand::Clean { .. }
23732373
| Subcommand::Check { .. }
23742374
| Subcommand::Clippy { .. }
2375-
| Subcommand::Fix { .. }
2375+
| Subcommand::Fix
23762376
| Subcommand::Run { .. }
23772377
| Subcommand::Setup { .. }
23782378
| Subcommand::Format { .. }

Diff for: src/bootstrap/src/core/config/flags.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -490,17 +490,17 @@ impl Subcommand {
490490
pub fn kind(&self) -> Kind {
491491
match self {
492492
Subcommand::Bench { .. } => Kind::Bench,
493-
Subcommand::Build { .. } => Kind::Build,
493+
Subcommand::Build => Kind::Build,
494494
Subcommand::Check { .. } => Kind::Check,
495495
Subcommand::Clippy { .. } => Kind::Clippy,
496496
Subcommand::Doc { .. } => Kind::Doc,
497-
Subcommand::Fix { .. } => Kind::Fix,
497+
Subcommand::Fix => Kind::Fix,
498498
Subcommand::Format { .. } => Kind::Format,
499499
Subcommand::Test { .. } => Kind::Test,
500500
Subcommand::Miri { .. } => Kind::Miri,
501501
Subcommand::Clean { .. } => Kind::Clean,
502-
Subcommand::Dist { .. } => Kind::Dist,
503-
Subcommand::Install { .. } => Kind::Install,
502+
Subcommand::Dist => Kind::Dist,
503+
Subcommand::Install => Kind::Install,
504504
Subcommand::Run { .. } => Kind::Run,
505505
Subcommand::Setup { .. } => Kind::Setup,
506506
Subcommand::Suggest { .. } => Kind::Suggest,

0 commit comments

Comments
 (0)