diff options
author | Andreu Botella <andreu@andreubotella.com> | 2022-05-13 10:36:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 10:36:31 +0200 |
commit | 3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad (patch) | |
tree | 7fcc92da290889d3d2290f6e4902ac60685aae87 /runtime/ops/web_worker.rs | |
parent | 0ee76da07b12fba38962634e65853d73adf9d4c0 (diff) |
chore(runtime): Make some ops in ext and runtime infallible. (#14589)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
Diffstat (limited to 'runtime/ops/web_worker.rs')
-rw-r--r-- | runtime/ops/web_worker.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/ops/web_worker.rs b/runtime/ops/web_worker.rs index 4137217bd..184ebfddb 100644 --- a/runtime/ops/web_worker.rs +++ b/runtime/ops/web_worker.rs @@ -55,16 +55,15 @@ async fn op_worker_recv_message( } #[op] -fn op_worker_close(state: &mut OpState) -> Result<(), AnyError> { +fn op_worker_close(state: &mut OpState) { // Notify parent that we're finished let mut handle = state.borrow_mut::<WebWorkerInternalHandle>().clone(); handle.terminate(); - Ok(()) } #[op] -fn op_worker_get_type(state: &mut OpState) -> Result<WebWorkerType, AnyError> { +fn op_worker_get_type(state: &mut OpState) -> WebWorkerType { let handle = state.borrow::<WebWorkerInternalHandle>().clone(); - Ok(handle.worker_type) + handle.worker_type } |