diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-08-26 00:22:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 00:22:15 +0200 |
commit | 9bfb0df805719cb3f022a5b5d9f9d898ae954c2e (patch) | |
tree | 6c7d62d95fcbde54ebbe1035bdc74618c63cfbc0 /cli/ops/compiler.rs | |
parent | d0ccab7fb7dd80030d3765ca9a9af44de6ecda5a (diff) |
refactor: remove OpError, use ErrBox everywhere (#7187)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/ops/compiler.rs')
-rw-r--r-- | cli/ops/compiler.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/ops/compiler.rs b/cli/ops/compiler.rs index 7ad4aece3..c35043e2d 100644 --- a/cli/ops/compiler.rs +++ b/cli/ops/compiler.rs @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. use super::dispatch_json::{JsonOp, Value}; -use crate::op_error::OpError; use crate::ops::json_op; use crate::state::State; use deno_core::CoreIsolate; use deno_core::CoreIsolateState; +use deno_core::ErrBox; use deno_core::ZeroCopyBuf; use std::rc::Rc; use std::sync::Arc; @@ -36,18 +36,18 @@ pub fn compiler_op<D>( &mut deno_core::CoreIsolateState, Value, &mut [ZeroCopyBuf], -) -> Result<JsonOp, OpError> +) -> Result<JsonOp, ErrBox> where D: Fn( Arc<Mutex<Option<String>>>, Value, &mut [ZeroCopyBuf], - ) -> Result<JsonOp, OpError>, + ) -> Result<JsonOp, ErrBox>, { move |_isolate_state: &mut CoreIsolateState, args: Value, zero_copy: &mut [ZeroCopyBuf]| - -> Result<JsonOp, OpError> { + -> Result<JsonOp, ErrBox> { dispatcher(response.clone(), args, zero_copy) } } @@ -56,7 +56,7 @@ fn op_compiler_respond( response: Arc<Mutex<Option<String>>>, args: Value, _zero_copy: &mut [ZeroCopyBuf], -) -> Result<JsonOp, OpError> { +) -> Result<JsonOp, ErrBox> { let mut r = response.lock().unwrap(); assert!( r.is_none(), |