Skip to content

Commit

Permalink
refactor: use clone_from instead of clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Yag000 committed May 6, 2024
1 parent 2e6c8aa commit a8970a4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,8 @@ impl CompilerScope {

fn leave_loop_scope(&mut self) -> Option<Rc<RefCell<LoopScope>>> {
let outer = self.loop_scope.clone();
self.loop_scope = self
.loop_scope
.clone()
.unwrap()
.as_ref()
.borrow()
.outer
.clone();
self.loop_scope
.clone_from(&self.loop_scope.clone().unwrap().as_ref().borrow().outer);
outer
}
}
Expand Down

0 comments on commit a8970a4

Please sign in to comment.