From 86d3d4d9ea64463b79c30ed9bf1036842e3cacfb Mon Sep 17 00:00:00 2001 From: LunaAmora Date: Thu, 29 Feb 2024 13:19:33 -0300 Subject: [PATCH] Adjust a mem::take line on `linearize_vars` --- src/term/transform/linearize_vars.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/term/transform/linearize_vars.rs b/src/term/transform/linearize_vars.rs index ad7591c02..b82ef717b 100644 --- a/src/term/transform/linearize_vars.rs +++ b/src/term/transform/linearize_vars.rs @@ -90,8 +90,8 @@ fn term_to_affine(term: &mut Term, inst_count: &mut HashMap) { 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; } }