diff options
Diffstat (limited to 'cli/repl.rs')
-rw-r--r-- | cli/repl.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/repl.rs b/cli/repl.rs index 614921d4d..28b99cf07 100644 --- a/cli/repl.rs +++ b/cli/repl.rs @@ -1,6 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. use crate::deno_dir::DenoDir; -use crate::op_error::OpError; use deno_core::ErrBox; use rustyline::Editor; use std::fs; @@ -42,11 +41,11 @@ impl Repl { .map(|_| debug!("Saved REPL history to: {:?}", self.history_file)) .map_err(|e| { eprintln!("Unable to save REPL history: {:?} {}", self.history_file, e); - ErrBox::from(e) + e.into() }) } - pub fn readline(&mut self, prompt: &str) -> Result<String, OpError> { + pub fn readline(&mut self, prompt: &str) -> Result<String, ErrBox> { self .editor .readline(&prompt) @@ -54,7 +53,8 @@ impl Repl { self.editor.add_history_entry(line.clone()); line }) - .map_err(OpError::from) + .map_err(ErrBox::from) + // Forward error to TS side for processing } } |