From b2abae477115dc6ca97a767c6800c7c3f1aa0ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 25 Sep 2023 00:07:22 +0200 Subject: refactor: rewrite more ops to op2 (#20666) --- ext/net/ops_unix.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/net/ops_unix.rs') diff --git a/ext/net/ops_unix.rs b/ext/net/ops_unix.rs index 1d20f2911..beb41bb4a 100644 --- a/ext/net/ops_unix.rs +++ b/ext/net/ops_unix.rs @@ -5,7 +5,6 @@ use crate::NetPermissions; use deno_core::error::bad_resource; use deno_core::error::custom_error; use deno_core::error::AnyError; -use deno_core::op; use deno_core::op2; use deno_core::AsyncRefCell; use deno_core::CancelHandle; @@ -159,12 +158,13 @@ pub async fn op_net_recv_unixpacket( Ok((nread, path)) } -#[op] -async fn op_net_send_unixpacket( +#[op2(async)] +#[number] +pub async fn op_net_send_unixpacket( state: Rc>, - rid: ResourceId, - path: String, - zero_copy: JsBuffer, + #[smi] rid: ResourceId, + #[string] path: String, + #[buffer] zero_copy: JsBuffer, ) -> Result where NP: NetPermissions + 'static, -- cgit v1.2.3