diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2022-03-14 23:38:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 23:38:53 +0100 |
commit | 88d0f01948b68f4a4d87e02a5138e94ac0a6eaea (patch) | |
tree | 2b50e5d2c6990c94f47e604281f3557b3efd9736 /runtime/ops/web_worker.rs | |
parent | 9f494dc405afc4b1b29fa4c813bd5751f26aaa36 (diff) |
feat(ops): custom arity (#13949)
Also cleanup & drop ignored wildcard op-args
Diffstat (limited to 'runtime/ops/web_worker.rs')
-rw-r--r-- | runtime/ops/web_worker.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/runtime/ops/web_worker.rs b/runtime/ops/web_worker.rs index 3c64cf1f6..4137217bd 100644 --- a/runtime/ops/web_worker.rs +++ b/runtime/ops/web_worker.rs @@ -33,7 +33,6 @@ pub fn init() -> Extension { fn op_worker_post_message( state: &mut OpState, data: JsMessageData, - _: (), ) -> Result<(), AnyError> { let handle = state.borrow::<WebWorkerInternalHandle>().clone(); handle.port.send(state, data)?; @@ -43,8 +42,6 @@ fn op_worker_post_message( #[op] async fn op_worker_recv_message( state: Rc<RefCell<OpState>>, - _: (), - _: (), ) -> Result<Option<JsMessageData>, AnyError> { let handle = { let state = state.borrow(); @@ -58,7 +55,7 @@ async fn op_worker_recv_message( } #[op] -fn op_worker_close(state: &mut OpState, _: (), _: ()) -> Result<(), AnyError> { +fn op_worker_close(state: &mut OpState) -> Result<(), AnyError> { // Notify parent that we're finished let mut handle = state.borrow_mut::<WebWorkerInternalHandle>().clone(); @@ -67,11 +64,7 @@ fn op_worker_close(state: &mut OpState, _: (), _: ()) -> Result<(), AnyError> { } #[op] -fn op_worker_get_type( - state: &mut OpState, - _: (), - _: (), -) -> Result<WebWorkerType, AnyError> { +fn op_worker_get_type(state: &mut OpState) -> Result<WebWorkerType, AnyError> { let handle = state.borrow::<WebWorkerInternalHandle>().clone(); Ok(handle.worker_type) } |