From 88d0f01948b68f4a4d87e02a5138e94ac0a6eaea Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Mon, 14 Mar 2022 23:38:53 +0100 Subject: feat(ops): custom arity (#13949) Also cleanup & drop ignored wildcard op-args --- core/ops_builtin.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'core/ops_builtin.rs') diff --git a/core/ops_builtin.rs b/core/ops_builtin.rs index 14d8c6e39..a742a77b1 100644 --- a/core/ops_builtin.rs +++ b/core/ops_builtin.rs @@ -40,7 +40,7 @@ pub(crate) fn init_builtins() -> Extension { } #[op] -pub fn void_op_sync(_: &mut OpState, _: (), _: ()) -> Result<(), Error> { +pub fn void_op_sync(_: &mut OpState) -> Result<(), Error> { Ok(()) } @@ -57,8 +57,6 @@ pub async fn void_op_async( #[op] pub fn op_resources( state: &mut OpState, - _: (), - _: (), ) -> Result, Error> { let serialized_resources = state .resource_table @@ -69,16 +67,12 @@ pub fn op_resources( } #[op] -pub fn op_void_sync(_state: &mut OpState, _: (), _: ()) -> Result<(), Error> { +pub fn op_void_sync(_state: &mut OpState) -> Result<(), Error> { Ok(()) } #[op] -pub async fn op_void_async( - _state: Rc>, - _: (), - _: (), -) -> Result<(), Error> { +pub async fn op_void_async(_state: Rc>) -> Result<(), Error> { Ok(()) } @@ -87,7 +81,6 @@ pub async fn op_void_async( pub fn op_close( state: &mut OpState, rid: Option, - _: (), ) -> Result<(), Error> { // TODO(@AaronO): drop Option after improving type-strictness balance in // serde_v8 @@ -102,7 +95,6 @@ pub fn op_close( pub fn op_try_close( state: &mut OpState, rid: Option, - _: (), ) -> Result<(), Error> { // TODO(@AaronO): drop Option after improving type-strictness balance in // serde_v8. @@ -114,8 +106,6 @@ pub fn op_try_close( #[op] pub fn op_metrics( state: &mut OpState, - _: (), - _: (), ) -> Result<(OpMetrics, Vec), Error> { let aggregate = state.tracker.aggregate(); let per_op = state.tracker.per_op(); @@ -229,7 +219,6 @@ async fn op_write( async fn op_shutdown( state: Rc>, rid: ResourceId, - _: (), ) -> Result<(), Error> { let resource = state.borrow().resource_table.get_any(rid)?; resource.shutdown().await -- cgit v1.2.3