summaryrefslogtreecommitdiff
path: root/cli/repl.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-08-26 00:22:15 +0200
committerGitHub <noreply@github.com>2020-08-26 00:22:15 +0200
commit9bfb0df805719cb3f022a5b5d9f9d898ae954c2e (patch)
tree6c7d62d95fcbde54ebbe1035bdc74618c63cfbc0 /cli/repl.rs
parentd0ccab7fb7dd80030d3765ca9a9af44de6ecda5a (diff)
refactor: remove OpError, use ErrBox everywhere (#7187)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/repl.rs')
-rw-r--r--cli/repl.rs8
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
}
}