From 38555a6a0fe9a7235776afe0ebfb2a24dc518391 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Fri, 3 Mar 2023 19:04:10 +0530 Subject: feat(ops): reland fast zero copy string arguments (#17996) Reland https://github.com/denoland/deno/pull/16777 The codegen is disabled in async ops and when fallback to slow call is possible (return type is a Result) to avoid hitting this V8 bug: https://github.com/denoland/deno/issues/17159 --- runtime/ops/os/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/ops/os') diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs index 020634c32..ac8ec541d 100644 --- a/runtime/ops/os/mod.rs +++ b/runtime/ops/os/mod.rs @@ -83,10 +83,10 @@ fn op_exec_path(state: &mut OpState) -> Result { #[op] fn op_set_env( state: &mut OpState, - key: String, - value: String, + key: &str, + value: &str, ) -> Result<(), AnyError> { - state.borrow_mut::().check_env(&key)?; + state.borrow_mut::().check_env(key)?; if key.is_empty() { return Err(type_error("Key is an empty string.")); } -- cgit v1.2.3