diff options
author | Gurwinder Singh <vargwin@gmail.com> | 2020-07-14 01:49:51 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-13 16:19:51 -0400 |
commit | d51972377c1325076704d9faec2eee6f0e024496 (patch) | |
tree | 67c75b20d8e07ff356652c71a6c9e87cd36ab41f /cli/ops/dispatch_json.rs | |
parent | 6af5149ea3d9b0accf7122073abbf852e355846f (diff) |
refactor: Make OpDispatcher a trait (#6736)
Diffstat (limited to 'cli/ops/dispatch_json.rs')
-rw-r--r-- | cli/ops/dispatch_json.rs | 5 |
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, |