Skip to content

Commit

Permalink
Adjust a mem::take line on linearize_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaAmora committed Feb 29, 2024
1 parent 495e042 commit a9fe81b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/term/transform/linearize_vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ fn term_to_affine(term: &mut Term, inst_count: &mut HashMap<Name, u64>) {
term_to_affine(val, inst_count);
} else {
let Term::Let { nxt, .. } = term else { unreachable!() };
let nxt = std::mem::take(nxt);
*term = *nxt;
let nxt = std::mem::take(nxt.as_mut());
*term = nxt;
}
}

Expand Down

0 comments on commit a9fe81b

Please sign in to comment.