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/repl.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/repl.rs')
-rw-r--r-- | cli/ops/repl.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/ops/repl.rs b/cli/ops/repl.rs index 88b7de881..b051dd574 100644 --- a/cli/ops/repl.rs +++ b/cli/ops/repl.rs @@ -1,11 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. use super::dispatch_json::{blocking_json, Deserialize, JsonOp, Value}; -use crate::op_error::OpError; use crate::repl; use crate::repl::Repl; 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; @@ -29,7 +29,7 @@ fn op_repl_start( state: &Rc<State>, args: Value, _zero_copy: &mut [ZeroCopyBuf], -) -> Result<JsonOp, OpError> { +) -> Result<JsonOp, ErrBox> { let args: ReplStartArgs = serde_json::from_value(args)?; debug!("op_repl_start {}", args.history_file); let history_path = @@ -52,7 +52,7 @@ fn op_repl_readline( _state: &Rc<State>, args: Value, _zero_copy: &mut [ZeroCopyBuf], -) -> Result<JsonOp, OpError> { +) -> Result<JsonOp, ErrBox> { let args: ReplReadlineArgs = serde_json::from_value(args)?; let rid = args.rid as u32; let prompt = args.prompt; @@ -60,7 +60,7 @@ fn op_repl_readline( let resource_table = isolate_state.resource_table.borrow(); let resource = resource_table .get::<ReplResource>(rid) - .ok_or_else(OpError::bad_resource_id)?; + .ok_or_else(ErrBox::bad_resource_id)?; let repl = resource.0.clone(); blocking_json(false, move || { |