summaryrefslogtreecommitdiff
path: root/cli/ops/dispatch_json.rs
diff options
context:
space:
mode:
authorGurwinder Singh <vargwin@gmail.com>2020-07-14 01:49:51 +0530
committerGitHub <noreply@github.com>2020-07-13 16:19:51 -0400
commitd51972377c1325076704d9faec2eee6f0e024496 (patch)
tree67c75b20d8e07ff356652c71a6c9e87cd36ab41f /cli/ops/dispatch_json.rs
parent6af5149ea3d9b0accf7122073abbf852e355846f (diff)
refactor: Make OpDispatcher a trait (#6736)
Diffstat (limited to 'cli/ops/dispatch_json.rs')
-rw-r--r--cli/ops/dispatch_json.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/ops/dispatch_json.rs b/cli/ops/dispatch_json.rs
index 26ffc7d33..30a3a4433 100644
--- a/cli/ops/dispatch_json.rs
+++ b/cli/ops/dispatch_json.rs
@@ -3,6 +3,7 @@ use crate::op_error::OpError;
use deno_core::Buf;
use deno_core::CoreIsolateState;
use deno_core::Op;
+use deno_core::OpDispatcher;
use deno_core::ZeroCopyBuf;
use futures::future::FutureExt;
pub use serde_derive::Deserialize;
@@ -44,9 +45,7 @@ struct AsyncArgs {
promise_id: Option<u64>,
}
-pub fn json_op<D>(
- d: D,
-) -> impl Fn(&mut CoreIsolateState, &mut [ZeroCopyBuf]) -> Op
+pub fn json_op<D>(d: D) -> impl OpDispatcher
where
D: Fn(
&mut CoreIsolateState,