summaryrefslogtreecommitdiff
path: root/core/ops_builtin.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2022-03-14 23:38:53 +0100
committerGitHub <noreply@github.com>2022-03-14 23:38:53 +0100
commit88d0f01948b68f4a4d87e02a5138e94ac0a6eaea (patch)
tree2b50e5d2c6990c94f47e604281f3557b3efd9736 /core/ops_builtin.rs
parent9f494dc405afc4b1b29fa4c813bd5751f26aaa36 (diff)
feat(ops): custom arity (#13949)
Also cleanup & drop ignored wildcard op-args
Diffstat (limited to 'core/ops_builtin.rs')
-rw-r--r--core/ops_builtin.rs17
1 files changed, 3 insertions, 14 deletions
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<Vec<(ResourceId, String)>, 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<RefCell<OpState>>,
- _: (),
- _: (),
-) -> Result<(), Error> {
+pub async fn op_void_async(_state: Rc<RefCell<OpState>>) -> Result<(), Error> {
Ok(())
}
@@ -87,7 +81,6 @@ pub async fn op_void_async(
pub fn op_close(
state: &mut OpState,
rid: Option<ResourceId>,
- _: (),
) -> 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<ResourceId>,
- _: (),
) -> 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<OpMetrics>), 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<RefCell<OpState>>,
rid: ResourceId,
- _: (),
) -> Result<(), Error> {
let resource = state.borrow().resource_table.get_any(rid)?;
resource.shutdown().await