Use locked_read.

This commit is contained in:
Stephen Chung
2022-06-26 14:10:09 +08:00
parent 84b8e1ed87
commit 7068775f19
10 changed files with 35 additions and 92 deletions

View File

@@ -1343,7 +1343,7 @@ pub fn optimize_into_ast(
let lib2 = &[&lib2];
for fn_def in functions {
let mut fn_def = crate::func::native::shared_take_or_clone(fn_def);
let mut fn_def = crate::func::shared_take_or_clone(fn_def);
// Optimize the function body
let body = mem::take(&mut *fn_def.body);