Fix tests.

This commit is contained in:
Stephen Chung
2022-12-12 16:17:51 +08:00
parent 67a7ab4069
commit ec5ad320a1
2 changed files with 14 additions and 16 deletions

View File

@@ -2197,16 +2197,10 @@ impl Module {
})
.for_each(|f| {
let hash = module.set_script_fn(f.clone());
let f = module.functions.as_mut().unwrap().get_mut(&hash).unwrap();
// Encapsulate AST environment
match module
.functions
.as_mut()
.unwrap()
.get_mut(&hash)
.unwrap()
.func
{
match f.func {
CallableFunction::Script(.., ref mut e) => *e = Some(environ.clone()),
_ => (),
}