perf: new_string_owned 零拷贝路径替代 new_string 二次克隆(B2)
This commit is contained in:
@@ -274,5 +274,5 @@ pub fn function_to_string<H: VmHost>(vm: &mut H, args: &[u8]) -> NativeResult {
|
||||
} else {
|
||||
format!("function {name}() {{ {body} }}")
|
||||
};
|
||||
NativeResult::Ok(vm.new_string(&result))
|
||||
NativeResult::Ok(vm.new_string_owned(result))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user