From 91b606aaae23bcb790b55adc5fe70a182a37d564 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 25 Feb 2020 09:14:27 -0500 Subject: Clean up how we use opIds (#4118) --- cli/ops/errors.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'cli/ops/errors.rs') diff --git a/cli/ops/errors.rs b/cli/ops/errors.rs index b5cc75f7a..c588759cf 100644 --- a/cli/ops/errors.rs +++ b/cli/ops/errors.rs @@ -3,7 +3,6 @@ use super::dispatch_json::{Deserialize, JsonOp, Value}; use crate::diagnostics::Diagnostic; use crate::fmt_errors::JSError; use crate::op_error::OpError; -use crate::ops::json_op; use crate::source_maps::get_orig_position; use crate::source_maps::CachedMaps; use crate::state::State; @@ -12,16 +11,13 @@ use std::collections::HashMap; pub fn init(i: &mut Isolate, s: &State) { i.register_op( - "apply_source_map", - s.core_op(json_op(s.stateful_op(op_apply_source_map))), + "op_apply_source_map", + s.stateful_json_op(op_apply_source_map), ); + i.register_op("op_format_error", s.stateful_json_op(op_format_error)); i.register_op( - "format_error", - s.core_op(json_op(s.stateful_op(op_format_error))), - ); - i.register_op( - "format_diagnostic", - s.core_op(json_op(s.stateful_op(op_format_diagnostic))), + "op_format_diagnostic", + s.stateful_json_op(op_format_diagnostic), ); } -- cgit v1.2.3