summaryrefslogtreecommitdiff
path: root/cli/repl.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-09-14 18:48:57 +0200
committerBert Belder <bertbelder@gmail.com>2020-09-15 01:50:52 +0200
commitf5b40c918c7d602827622d167728a3e7bae87d9d (patch)
treefb51722e043f4d6bce64a2c7e897cce4ead06c82 /cli/repl.rs
parent3da20d19a14ab6838897d281f1b11e49d68bd1a7 (diff)
refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)
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 8387de05f..7873f7d0f 100644
--- a/cli/repl.rs
+++ b/cli/repl.rs
@@ -1,7 +1,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::deno_dir::DenoDir;
-use deno_core::ErrBox;
+use deno_core::error::AnyError;
use rustyline::Editor;
use std::fs;
use std::path::PathBuf;
@@ -34,7 +34,7 @@ impl Repl {
.unwrap_or(())
}
- fn save_history(&mut self) -> Result<(), ErrBox> {
+ fn save_history(&mut self) -> Result<(), AnyError> {
fs::create_dir_all(self.history_file.parent().unwrap())?;
self
.editor
@@ -46,7 +46,7 @@ impl Repl {
})
}
- pub fn readline(&mut self, prompt: &str) -> Result<String, ErrBox> {
+ pub fn readline(&mut self, prompt: &str) -> Result<String, AnyError> {
self
.editor
.readline(&prompt)
@@ -54,7 +54,7 @@ impl Repl {
self.editor.add_history_entry(line.clone());
line
})
- .map_err(ErrBox::from)
+ .map_err(AnyError::from)
// Forward error to TS side for processing
}