diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-09-07 10:56:02 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 10:56:02 -0600 |
commit | 9226207c017666ef10712fa3fda35f773025ae03 (patch) | |
tree | 73e8ffc3c45000890fe1f103bc8dcae9d282d7b6 /ext/node/ops/os.rs | |
parent | 3fc19dab47492e06043fc7add28e64693a4eb775 (diff) |
chore(ext/node): port some ops to op2 (#20400)
Diffstat (limited to 'ext/node/ops/os.rs')
-rw-r--r-- | ext/node/ops/os.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/node/ops/os.rs b/ext/node/ops/os.rs index 7dc1a7684..de44e857b 100644 --- a/ext/node/ops/os.rs +++ b/ext/node/ops/os.rs @@ -2,10 +2,10 @@ use crate::NodePermissions; use deno_core::error::AnyError; -use deno_core::op; +use deno_core::op2; use deno_core::OpState; -#[op] +#[op2(fast)] pub fn op_node_os_get_priority<P>( state: &mut OpState, pid: u32, @@ -21,7 +21,7 @@ where priority::get_priority(pid) } -#[op] +#[op2(fast)] pub fn op_node_os_set_priority<P>( state: &mut OpState, pid: u32, @@ -38,7 +38,8 @@ where priority::set_priority(pid, priority) } -#[op] +#[op2] +#[string] pub fn op_node_os_username<P>(state: &mut OpState) -> Result<String, AnyError> where P: NodePermissions + 'static, |