Skip to content

Commit c274459

Browse files
committed
clippy lints
1 parent 2b684f3 commit c274459

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

src/bootstrap/src/core/build_steps/tool.rs

-1
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,6 @@ impl Step for LldWrapper {
817817
fields(build_compiler = ?self.build_compiler, target_compiler = ?self.target_compiler),
818818
),
819819
)]
820-
821820
fn run(self, builder: &Builder<'_>) -> ToolBuildResult {
822821
if builder.config.dry_run() {
823822
return ToolBuildResult {

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

-1
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,6 @@ impl<'a> Builder<'a> {
12761276
),
12771277
),
12781278
)]
1279-
12801279
/// FIXME: This function is unnecessary (and dangerous, see <https://github.com/rust-lang/rust/issues/137469>).
12811280
/// We already have uplifting logic for the compiler, so remove this.
12821281
pub fn compiler_for(

src/bootstrap/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,7 @@ Executed at: {executed_at}"#,
15571557
!self.config.full_bootstrap
15581558
&& !self.config.download_rustc()
15591559
&& stage >= 2
1560-
&& (self.hosts.iter().any(|h| *h == target) || target == self.build)
1560+
&& (self.hosts.contains(&target) || target == self.build)
15611561
}
15621562

15631563
/// Checks whether the `compiler` compiling for `target` should be forced to

src/bootstrap/src/utils/helpers.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,7 @@ pub fn dir_is_empty(dir: &Path) -> bool {
432432
/// the "y" part from the string.
433433
pub fn extract_beta_rev(version: &str) -> Option<String> {
434434
let parts = version.splitn(2, "-beta.").collect::<Vec<_>>();
435-
let count = parts.get(1).and_then(|s| s.find(' ').map(|p| s[..p].to_string()));
436-
437-
count
435+
parts.get(1).and_then(|s| s.find(' ').map(|p| s[..p].to_string()))
438436
}
439437

440438
pub enum LldThreads {

0 commit comments

Comments
 (0)