Implement Eq and PartialEq for ScriptFnMetadata that sorts on function signature.

This commit is contained in:
Stephen Chung
2021-05-04 10:19:08 +08:00
parent c61b118037
commit 13c620de4b
2 changed files with 18 additions and 1 deletions

View File

@@ -1456,7 +1456,7 @@ impl Module {
.filter(|f| f.func.is_script())
.for_each(|f| {
// Encapsulate AST environment
let mut func = crate::fn_native::shared_take_or_clone(f.func.get_fn_def().clone());
let mut func = f.func.get_fn_def().as_ref().clone();
func.lib = Some(ast.shared_lib());
func.mods = func_mods.clone();
module.set_script_fn(func);