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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user