feat(gen_uplc::scope): use some assumptions to simplify replace

This commit is contained in:
rvcas
2023-03-27 19:45:04 -04:00
committed by Lucas
parent c8ac9aa165
commit e5980c5a96
2 changed files with 11 additions and 39 deletions

View File

@@ -54,10 +54,8 @@ impl AirStack {
}
pub fn merge_child(&mut self, mut other: AirStack) {
let pattern = self.scope.common_ancestor(&other.scope);
for ir in other.air.iter_mut() {
ir.scope_mut().replace(&pattern, self.scope.clone());
ir.scope_mut().replace(self.scope.clone());
}
self.merge(other);