From f83d672ffad7afb1473bd4f9b9c645539064c620 Mon Sep 17 00:00:00 2001 From: Gurwinder Singh Date: Tue, 14 Jul 2020 23:52:02 +0530 Subject: refactor: new trait JsonOpDispatcher (#6742) --- cli/ops/plugin.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cli/ops/plugin.rs') diff --git a/cli/ops/plugin.rs b/cli/ops/plugin.rs index ba105cff8..3edcaa962 100644 --- a/cli/ops/plugin.rs +++ b/cli/ops/plugin.rs @@ -3,7 +3,6 @@ use crate::op_error::OpError; use crate::ops::dispatch_json::Deserialize; use crate::ops::dispatch_json::JsonOp; use crate::ops::dispatch_json::Value; -use crate::ops::json_op; use crate::state::State; use deno_core::plugin_api; use deno_core::CoreIsolate; @@ -21,10 +20,7 @@ use std::task::Context; use std::task::Poll; pub fn init(i: &mut CoreIsolate, s: &State) { - i.register_op( - "op_open_plugin", - s.core_op(json_op(s.stateful_op2(op_open_plugin))), - ); + i.register_op("op_open_plugin", s.stateful_json_op2(op_open_plugin)); } #[derive(Deserialize)] -- cgit v1.2.3