diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-09-14 18:48:57 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-09-15 01:50:52 +0200 |
commit | f5b40c918c7d602827622d167728a3e7bae87d9d (patch) | |
tree | fb51722e043f4d6bce64a2c7e897cce4ead06c82 /cli/tsc_config.rs | |
parent | 3da20d19a14ab6838897d281f1b11e49d68bd1a7 (diff) |
refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)
Diffstat (limited to 'cli/tsc_config.rs')
-rw-r--r-- | cli/tsc_config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tsc_config.rs b/cli/tsc_config.rs index e5f7bcdc4..a86b549bc 100644 --- a/cli/tsc_config.rs +++ b/cli/tsc_config.rs @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -use deno_core::ErrBox; +use deno_core::error::AnyError; use jsonc_parser::JsonValue; use serde::Deserialize; use serde_json::Value; @@ -139,7 +139,7 @@ struct TSConfigJson { type_acquisition: Option<Value>, } -pub fn parse_raw_config(config_text: &str) -> Result<Value, ErrBox> { +pub fn parse_raw_config(config_text: &str) -> Result<Value, AnyError> { assert!(!config_text.is_empty()); let jsonc = jsonc_parser::parse_to_value(config_text)?.unwrap(); Ok(jsonc_to_serde(jsonc)) @@ -149,7 +149,7 @@ pub fn parse_raw_config(config_text: &str) -> Result<Value, ErrBox> { /// The result also contains any options that were ignored. pub fn parse_config( config_text: &str, -) -> Result<(Value, Option<IgnoredCompilerOptions>), ErrBox> { +) -> Result<(Value, Option<IgnoredCompilerOptions>), AnyError> { assert!(!config_text.is_empty()); let jsonc = jsonc_parser::parse_to_value(config_text)?.unwrap(); let config: TSConfigJson = serde_json::from_value(jsonc_to_serde(jsonc))?; |