refactor: 拆分 Kernel 中可变 Session 与不可变 Core
This commit is contained in:
@@ -37,7 +37,7 @@ fn eval_val(source: &str) -> (Vm, Result<JsValue, String>) {
|
||||
|
||||
fn to_str(vm: &Vm, val: JsValue) -> String {
|
||||
if val.is_string() {
|
||||
vm.kernel().string_forge().lookup(val.as_string_index()).unwrap_or_default()
|
||||
vm.kernel_core().string_forge().lookup(val.as_string_index()).unwrap_or_default()
|
||||
} else {
|
||||
format!("{}", val)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user