Skip to content

Commit 74fdbf9

Browse files
Rollup merge of rust-lang#163905 - Jules-Bertholet:bootstrap-tweak, r=Kobzol
Remove redundant closure in bootstrap My PR rust-lang#163717 would make Clippy start linting `redundant_closure_for_method_calls` here; let's get ahead of that. @rustbot label T-bootstrap @rustbot ready r? bootstrap
2 parents 5809dd8 + 3d0abf0 commit 74fdbf9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • src/bootstrap/src/core/builder

‎src/bootstrap/src/core/builder/mod.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,10 +1120,9 @@ impl<'a> Builder<'a> {
11201120
Subcommand::Run { .. } => (Kind::Run, &paths[..]),
11211121
Subcommand::Clean { .. } => (Kind::Clean, &paths[..]),
11221122
Subcommand::Format { .. } => (Kind::Format, &[][..]),
1123-
Subcommand::Setup { profile: ref path } => (
1124-
Kind::Setup,
1125-
path.as_ref().map_or([].as_slice(), |path| std::slice::from_ref(path)),
1126-
),
1123+
Subcommand::Setup { profile: ref path } => {
1124+
(Kind::Setup, path.as_ref().map_or([].as_slice(), std::slice::from_ref))
1125+
}
11271126
Subcommand::Vendor { .. } => (Kind::Vendor, &paths[..]),
11281127
Subcommand::Perf { .. } => (Kind::Perf, &paths[..]),
11291128
};

0 commit comments

Comments
 (0)