Skip to content

Commit

Permalink
Update compiler/passes/src/function_inlining/inline_program.rs
Browse files Browse the repository at this point in the history
Co-authored-by: d0cd <[email protected]>
Signed-off-by: evan-schott <[email protected]>
  • Loading branch information
evan-schott and d0cd authored Oct 3, 2023
1 parent 7f0dc18 commit 64649a3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/passes/src/function_inlining/inline_program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 64649a3

Please sign in to comment.