From d51972377c1325076704d9faec2eee6f0e024496 Mon Sep 17 00:00:00 2001 From: Gurwinder Singh Date: Tue, 14 Jul 2020 01:49:51 +0530 Subject: refactor: Make OpDispatcher a trait (#6736) --- cli/ops/dispatch_json.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cli/ops/dispatch_json.rs') 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, } -pub fn json_op( - d: D, -) -> impl Fn(&mut CoreIsolateState, &mut [ZeroCopyBuf]) -> Op +pub fn json_op(d: D) -> impl OpDispatcher where D: Fn( &mut CoreIsolateState, -- cgit v1.2.3