summaryrefslogtreecommitdiff
path: root/cli/ops/web_worker.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-08-12 10:44:58 -0400
committerGitHub <noreply@github.com>2020-08-12 16:44:58 +0200
commitf5a4f1fdc04b24cdfbef83842b9c42b5032c4059 (patch)
treef0ead2884b3b69b287a05a82885e30a541116063 /cli/ops/web_worker.rs
parent6706eb551532ee6c84ad013377ac2cd91681424a (diff)
Undo JsonOpDispatcher and OpDispatcher traits (#7023)
This reverts commit f83d672ffad7afb1473bd4f9b9c645539064c620. This reverts commit d51972377c1325076704d9faec2eee6f0e024496.
Diffstat (limited to 'cli/ops/web_worker.rs')
-rw-r--r--cli/ops/web_worker.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/cli/ops/web_worker.rs b/cli/ops/web_worker.rs
index 4a661d2be..553278b07 100644
--- a/cli/ops/web_worker.rs
+++ b/cli/ops/web_worker.rs
@@ -2,7 +2,6 @@
use super::dispatch_json::{JsonOp, Value};
use crate::op_error::OpError;
use crate::ops::json_op;
-use crate::ops::JsonOpDispatcher;
use crate::state::State;
use crate::web_worker::WebWorkerHandle;
use crate::worker::WorkerEvent;
@@ -15,7 +14,11 @@ use std::convert::From;
pub fn web_worker_op<D>(
sender: mpsc::Sender<WorkerEvent>,
dispatcher: D,
-) -> impl JsonOpDispatcher
+) -> impl Fn(
+ &mut CoreIsolateState,
+ Value,
+ &mut [ZeroCopyBuf],
+) -> Result<JsonOp, OpError>
where
D: Fn(
&mpsc::Sender<WorkerEvent>,
@@ -33,7 +36,11 @@ pub fn web_worker_op2<D>(
handle: WebWorkerHandle,
sender: mpsc::Sender<WorkerEvent>,
dispatcher: D,
-) -> impl JsonOpDispatcher
+) -> impl Fn(
+ &mut CoreIsolateState,
+ Value,
+ &mut [ZeroCopyBuf],
+) -> Result<JsonOp, OpError>
where
D: Fn(
WebWorkerHandle,