Refactor multiple if let bindings

Replaces nested `if let` statements with sequential `if let` bindings,
improving readability. This change is applied to `Dumper::log_bound`,
`LambdaCollector::visit_bound`, `Environment::call_object_method`, and
`Environment::call_lambda`.
This commit is contained in:
Michael Schimmel
2026-02-19 23:56:50 +01:00
parent 1331aabbe1
commit 30cd73aa63
3 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -32,10 +32,10 @@ impl<'a> LambdaCollector<'a> {
BoundKind::Set { addr, value } => {
// Also track assignments to globals if they hold lambdas.
if let Address::Global(global_index) = addr {
if let BoundKind::Lambda { .. } = &value.kind {
self.registry.insert(*global_index, (**value).clone());
}
if let Address::Global(global_index) = addr
&& let BoundKind::Lambda { .. } = &value.kind
{
self.registry.insert(*global_index, (**value).clone());
}
self.visit(value);
}