diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-02-28 23:28:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 16:28:02 +0100 |
commit | ded68aba7302488c1e41214766017f9f5a9a2d86 (patch) | |
tree | ae95d8eaf4f396ecd383a59da62781baeb36c113 | |
parent | d88d8b75d0e44a0e667b4e68ee6c1fa17a431f50 (diff) |
chore(runtime): remove rustyline dependency (#9625)
-rw-r--r-- | Cargo.lock | 1 | ||||
-rw-r--r-- | runtime/Cargo.toml | 1 | ||||
-rw-r--r-- | runtime/errors.rs | 17 |
3 files changed, 0 insertions, 19 deletions
diff --git a/Cargo.lock b/Cargo.lock index 221366951..cb03ac66b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -554,7 +554,6 @@ dependencies = [ "percent-encoding", "regex", "ring", - "rustyline", "serde", "sys-info", "termcolor", diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 091e0340d..cdae5a40c 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -49,7 +49,6 @@ notify = "5.0.0-pre.4" percent-encoding = "2.1.0" regex = "1.4.3" ring = "0.16.20" -rustyline = { version = "7.1.0", default-features = false } serde = { version = "1.0.123", features = ["derive"] } sys-info = "0.8.0" termcolor = "1.1.2" diff --git a/runtime/errors.rs b/runtime/errors.rs index 7c497ef32..b3d474504 100644 --- a/runtime/errors.rs +++ b/runtime/errors.rs @@ -14,7 +14,6 @@ use deno_core::serde_json; use deno_core::url; use deno_core::ModuleResolutionError; use deno_fetch::reqwest; -use rustyline::error::ReadlineError; use std::env; use std::error::Error; use std::io; @@ -82,18 +81,6 @@ fn get_notify_error_class(error: ¬ify::Error) -> &'static str { } } -fn get_readline_error_class(error: &ReadlineError) -> &'static str { - use ReadlineError::*; - match error { - Io(err) => get_io_error_class(err), - Eof => "UnexpectedEof", - Interrupted => "Interrupted", - #[cfg(unix)] - Errno(err) => get_nix_error_class(err), - _ => unimplemented!(), - } -} - fn get_regex_error_class(error: ®ex::Error) -> &'static str { use regex::Error::*; match error { @@ -188,10 +175,6 @@ pub fn get_error_class_name(e: &AnyError) -> Option<&'static str> { .map(get_notify_error_class) }) .or_else(|| { - e.downcast_ref::<ReadlineError>() - .map(get_readline_error_class) - }) - .or_else(|| { e.downcast_ref::<reqwest::Error>() .map(get_request_error_class) }) |