Fix sync build.

This commit is contained in:
Stephen Chung
2022-01-28 22:07:49 +08:00
parent c93e94c7cd
commit c397a6dcb5
4 changed files with 19 additions and 12 deletions

View File

@@ -1685,7 +1685,6 @@ impl Module {
// Save global state
let orig_imports_len = global.num_imports();
let orig_source = global.source.clone();
#[cfg(not(feature = "no_module"))]
#[cfg(not(feature = "no_function"))]
let orig_constants = std::mem::take(&mut global.constants);
@@ -1719,7 +1718,6 @@ impl Module {
}
// Restore global state
#[cfg(not(feature = "no_module"))]
#[cfg(not(feature = "no_function"))]
{
global.constants = orig_constants;