Skip to content

Commit 374238e

Browse files
committed
chore: fix clippy warnings
1 parent 531a437 commit 374238e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

crates/forge_analyzer/src/definitions.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1307,10 +1307,7 @@ impl FunctionAnalyzer<'_> {
13071307
fn lower_call(&mut self, callee: CalleeRef<'_>, args: &[ExprOrSpread]) -> Operand {
13081308
let props = normalize_callee_expr(callee, self.res, self.module);
13091309
if let Some(&PropPath::Def(id)) = props.first() {
1310-
if self.res.is_imported_from(id, "@forge/ui").map_or(
1311-
false,
1312-
|imp| matches!(imp, ImportKind::Named(s) if *s == *"useState" || *s == *"useEffect"),
1313-
) || calls_method(callee, "then")
1310+
if self.res.is_imported_from(id, "@forge/ui").is_some_and(|imp| matches!(imp, ImportKind::Named(s) if *s == *"useState" || *s == *"useEffect")) || calls_method(callee, "then")
13141311
|| calls_method(callee, "map")
13151312
|| calls_method(callee, "foreach")
13161313
|| calls_method(callee, "filter")

crates/forge_analyzer/src/interp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub trait Dataflow<'cx>: Sized {
185185
Successors::Return => {
186186
if interp
187187
.func_state(def)
188-
.map_or(true, |old_state| old_state < state)
188+
.is_none_or(|old_state| old_state < state)
189189
{
190190
interp.set_func_state(def, state);
191191
let calls = interp.called_from(def);

0 commit comments

Comments
 (0)