summaryrefslogtreecommitdiff
path: root/ext/net/ops_unix.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-09-25 00:07:22 +0200
committerGitHub <noreply@github.com>2023-09-24 22:07:22 +0000
commitb2abae477115dc6ca97a767c6800c7c3f1aa0ebb (patch)
tree30efc8654c21ebeb65cc3e60b14b336506ca42ad /ext/net/ops_unix.rs
parent98ef7bd8183f7fa534c3bfea8376d4c452b5d8d7 (diff)
refactor: rewrite more ops to op2 (#20666)
Diffstat (limited to 'ext/net/ops_unix.rs')
-rw-r--r--ext/net/ops_unix.rs12
1 files changed, 6 insertions, 6 deletions
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<NP>(
+#[op2(async)]
+#[number]
+pub async fn op_net_send_unixpacket<NP>(
state: Rc<RefCell<OpState>>,
- rid: ResourceId,
- path: String,
- zero_copy: JsBuffer,
+ #[smi] rid: ResourceId,
+ #[string] path: String,
+ #[buffer] zero_copy: JsBuffer,
) -> Result<usize, AnyError>
where
NP: NetPermissions + 'static,