diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-09-06 21:44:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-06 21:44:29 +0200 |
commit | f57a2c1e85387afe48b7bdb57176dafb156bb86e (patch) | |
tree | c198f7c965a883acacc9c1410c620d6290cd43ef /cli/fmt_errors.rs | |
parent | 16a9c92aba9ba8376393d6df4fa9677ac6113578 (diff) |
refactor(core): rename CoreIsolate to JsRuntime (#7373)
deno_core/
- rename core_isolate.rs to runtime.rs
- rename CoreIsolate to JsRuntime
- rename JSError to JsError
- rename JSStackFrame to JsStackFrame
cli/
- update references from deno_core::CoreIsolate to deno_core::JsRuntime
- rename deno_core::JSError to deno_core::JsError
- rename fmt_errors::JSError to fmt_errors::JsError
Diffstat (limited to 'cli/fmt_errors.rs')
-rw-r--r-- | cli/fmt_errors.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cli/fmt_errors.rs b/cli/fmt_errors.rs index b2925f625..afbf560d0 100644 --- a/cli/fmt_errors.rs +++ b/cli/fmt_errors.rs @@ -103,13 +103,13 @@ fn format_maybe_source_line( format!("\n{}{}\n{}{}", indent, source_line, indent, color_underline) } -/// Wrapper around deno_core::JSError which provides color to_string. +/// Wrapper around deno_core::JsError which provides color to_string. #[derive(Debug)] -pub struct JSError(deno_core::JSError); +pub struct JsError(deno_core::JsError); -impl JSError { +impl JsError { pub fn create( - core_js_error: deno_core::JSError, + core_js_error: deno_core::JsError, source_map_getter: &impl SourceMapGetter, ) -> ErrBox { let core_js_error = apply_source_map(&core_js_error, source_map_getter); @@ -118,14 +118,14 @@ impl JSError { } } -impl Deref for JSError { - type Target = deno_core::JSError; +impl Deref for JsError { + type Target = deno_core::JsError; fn deref(&self) -> &Self::Target { &self.0 } } -impl fmt::Display for JSError { +impl fmt::Display for JsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let mut formatted_frames = self.0.formatted_frames.clone(); @@ -170,7 +170,7 @@ impl fmt::Display for JSError { } } -impl Error for JSError {} +impl Error for JsError {} #[cfg(test)] mod tests { |