From 9bfb0df805719cb3f022a5b5d9f9d898ae954c2e Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 26 Aug 2020 00:22:15 +0200 Subject: refactor: remove OpError, use ErrBox everywhere (#7187) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- cli/ops/errors.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/ops/errors.rs') diff --git a/cli/ops/errors.rs b/cli/ops/errors.rs index 02295d7f8..b9405fe54 100644 --- a/cli/ops/errors.rs +++ b/cli/ops/errors.rs @@ -1,11 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. use super::dispatch_json::{Deserialize, JsonOp, Value}; use crate::diagnostics::Diagnostic; -use crate::op_error::OpError; use crate::source_maps::get_orig_position; use crate::source_maps::CachedMaps; use crate::state::State; use deno_core::CoreIsolate; +use deno_core::ErrBox; use deno_core::ZeroCopyBuf; use std::collections::HashMap; use std::rc::Rc; @@ -33,7 +33,7 @@ fn op_apply_source_map( state: &Rc, args: Value, _zero_copy: &mut [ZeroCopyBuf], -) -> Result { +) -> Result { let args: ApplySourceMap = serde_json::from_value(args)?; let mut mappings_map: CachedMaps = HashMap::new(); @@ -57,7 +57,7 @@ fn op_format_diagnostic( _state: &Rc, args: Value, _zero_copy: &mut [ZeroCopyBuf], -) -> Result { +) -> Result { let diagnostic = serde_json::from_value::(args)?; Ok(JsonOp::Sync(json!(diagnostic.to_string()))) } -- cgit v1.2.3