From d5f39fd121b8f997dcfb360828f60cee47322ab3 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Sat, 8 May 2021 14:37:42 +0200 Subject: cleanup(ops): remove unused ZeroCopyBuf arg-types (#10530) --- core/examples/http_bench_json_ops.rs | 6 +++--- core/ops_builtin.rs | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'core') diff --git a/core/examples/http_bench_json_ops.rs b/core/examples/http_bench_json_ops.rs index f891caa9e..88556cea7 100644 --- a/core/examples/http_bench_json_ops.rs +++ b/core/examples/http_bench_json_ops.rs @@ -123,7 +123,7 @@ fn create_js_runtime() -> JsRuntime { fn op_listen( state: &mut OpState, _args: (), - _bufs: Option, + _: (), ) -> Result { log::debug!("listen"); let addr = "127.0.0.1:4544".parse::().unwrap(); @@ -137,7 +137,7 @@ fn op_listen( fn op_close( state: &mut OpState, rid: ResourceId, - _buf: Option, + _: (), ) -> Result<(), AnyError> { log::debug!("close rid={}", rid); state @@ -150,7 +150,7 @@ fn op_close( async fn op_accept( state: Rc>, rid: ResourceId, - _buf: Option, + _: (), ) -> Result { log::debug!("accept rid={}", rid); diff --git a/core/ops_builtin.rs b/core/ops_builtin.rs index 7160b408a..023edc60e 100644 --- a/core/ops_builtin.rs +++ b/core/ops_builtin.rs @@ -6,7 +6,6 @@ use crate::op_sync; use crate::resources::ResourceId; use crate::Extension; use crate::OpState; -use crate::ZeroCopyBuf; use std::io::{stderr, stdout, Write}; pub(crate) fn init_builtins() -> Extension { @@ -29,7 +28,7 @@ pub(crate) fn init_builtins() -> Extension { pub fn op_resources( state: &mut OpState, _args: (), - _zero_copy: Option, + _: (), ) -> Result, AnyError> { let serialized_resources = state .resource_table @@ -43,7 +42,7 @@ pub fn op_resources( pub fn op_close( state: &mut OpState, rid: Option, - _zero_copy: Option, + _: (), ) -> Result<(), AnyError> { // TODO(@AaronO): drop Option after improving type-strictness balance in serde_v8 let rid = rid.ok_or_else(|| type_error("missing or invalid `rid`"))?; @@ -59,7 +58,7 @@ pub fn op_close( pub fn op_print( _state: &mut OpState, args: (String, bool), - _zero_copy: Option, + _: (), ) -> Result<(), AnyError> { let (msg, is_err) = args; if is_err { -- cgit v1.2.3