Skip to content

Commit a06b719

Browse files
authored
Fix clippy lints after rust update (#2002)
1 parent da8e945 commit a06b719

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

scarb/src/ops/expand.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@ pub fn expand(package: Package, opts: ExpandOpts, ws: &Workspace<'_>) -> Result<
8181
// Includes test package ids.
8282
get_test_package_ids(vec![package.id], ws).contains(&unit.main_package_id())
8383
// We can use main_component below, as targets are not grouped.
84-
&& target_kind.as_ref()
85-
.map_or(true, |kind| unit.main_component().target_kind() == *kind)
84+
&& target_kind.as_ref().is_none_or(|kind| unit.main_component().target_kind() == *kind)
8685
&& opts
8786
.target_name
88-
.as_ref()
89-
.map_or(true, |name| unit.main_component().first_target().name == *name)
87+
.as_ref().is_none_or(|name| unit.main_component().first_target().name == *name)
9088
})
9189
.map(|unit| match unit {
9290
CompilationUnit::Cairo(unit) => Ok(unit),

0 commit comments

Comments
 (0)