From 64649a3d3d12f80f6b6aa25157d54ff0015a0472 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:34:37 -0700 Subject: [PATCH] Update compiler/passes/src/function_inlining/inline_program.rs Co-authored-by: d0cd Signed-off-by: evan-schott <53463459+evan-schott@users.noreply.github.com> --- compiler/passes/src/function_inlining/inline_program.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/passes/src/function_inlining/inline_program.rs b/compiler/passes/src/function_inlining/inline_program.rs index 3ae73c095b..ccbf0e65b2 100644 --- a/compiler/passes/src/function_inlining/inline_program.rs +++ b/compiler/passes/src/function_inlining/inline_program.rs @@ -43,9 +43,7 @@ impl ProgramReconstructor for FunctionInliner<'_> { assert!(input.functions.is_empty(), "All functions in the program scope should have been processed."); // Note that this intentionally clears `self.reconstructed_functions` for the next program scope. - let functions = core::mem::take( - &mut self.reconstructed_functions.iter().map(|(symbol, function)| (*symbol, function.clone())).collect(), - ); + let functions = core::mem::take(&mut self.reconstructed_functions).into_iter().map(|(symbol, function)| (*symbol, function.clone())).collect(); ProgramScope { program_id: input.program_id,