perf: 收紧字符串借用语义消除跨分配点 UB
This commit is contained in:
@@ -22,7 +22,7 @@ fn run(module: &CompiledModule) -> JsValue {
|
||||
fn eval_str(source: &str) -> String {
|
||||
let v = eval(source);
|
||||
if v.is_string() {
|
||||
unsafe { oxide_runtime_api::string_data(v) }.to_string()
|
||||
oxide_runtime_api::to_string(v)
|
||||
} else {
|
||||
format!("{v}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user