Skip to content

Commit e1b2ffe

Browse files
committed
bless clippy
Signed-off-by: onur-ozkan <[email protected]>
1 parent 797bea5 commit e1b2ffe

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl Step for RustAnalyzer {
347347
.config
348348
.tools
349349
.as_ref()
350-
.map_or(true, |tools| tools.iter().any(|tool| tool == "rust-analyzer")),
350+
.is_none_or(|tools| tools.iter().any(|tool| tool == "rust-analyzer")),
351351
)
352352
}
353353

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,10 +1684,10 @@ impl Step for Sysroot {
16841684
];
16851685
let ci_rustc_dir = builder.config.ci_rustc_dir();
16861686
builder.cp_link_filtered(&ci_rustc_dir, &sysroot, &|path| {
1687-
if path.extension().map_or(true, |ext| !filtered_extensions.contains(&ext)) {
1687+
if path.extension().is_none_or(|ext| !filtered_extensions.contains(&ext)) {
16881688
return true;
16891689
}
1690-
if !path.parent().map_or(true, |p| p.ends_with(&suffix)) {
1690+
if path.parent().is_none_or(|p| p.ends_with(&suffix)) {
16911691
return true;
16921692
}
16931693
if !filtered_files.iter().all(|f| f != path.file_name().unwrap()) {

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn should_build_extended_tool(builder: &Builder<'_>, tool: &str) -> bool {
4747
if !builder.config.extended {
4848
return false;
4949
}
50-
builder.config.tools.as_ref().map_or(true, |tools| tools.contains(tool))
50+
builder.config.tools.as_ref().is_none_or(|tools| tools.contains(tool))
5151
}
5252

5353
#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
@@ -410,7 +410,7 @@ impl Step for Rustc {
410410
.config
411411
.tools
412412
.as_ref()
413-
.map_or(true, |tools| tools.iter().any(|tool| tool == "rustdoc"))
413+
.is_none_or(|tools| tools.iter().any(|tool| tool == "rustdoc"))
414414
{
415415
let rustdoc = builder.rustdoc(compiler);
416416
builder.install(&rustdoc, &image.join("bin"), 0o755);

src/bootstrap/src/core/build_steps/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ impl Step for Src {
307307

308308
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
309309
let config = &run.builder.config;
310-
let cond = config.extended && config.tools.as_ref().map_or(true, |t| t.contains("src"));
310+
let cond = config.extended && config.tools.as_ref().is_none_or(|t| t.contains("src"));
311311
run.path("src").default_condition(cond)
312312
}
313313

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ impl<'a> Builder<'a> {
14261426
let mut stack = self.stack.borrow_mut();
14271427
for stack_step in stack.iter() {
14281428
// should skip
1429-
if stack_step.downcast_ref::<S>().map_or(true, |stack_step| *stack_step != step) {
1429+
if stack_step.downcast_ref::<S>().is_none_or(|stack_step| *stack_step != step) {
14301430
continue;
14311431
}
14321432
let mut out = String::new();

0 commit comments

Comments
 (0)