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/import_map.rs | |
parent | 3da20d19a14ab6838897d281f1b11e49d68bd1a7 (diff) |
refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)
Diffstat (limited to 'cli/import_map.rs')
-rw-r--r-- | cli/import_map.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/import_map.rs b/cli/import_map.rs index 51c03a4e1..e0050c8aa 100644 --- a/cli/import_map.rs +++ b/cli/import_map.rs @@ -1,4 +1,4 @@ -use deno_core::ErrBox; +use deno_core::error::AnyError; use deno_core::ModuleSpecifier; use indexmap::IndexMap; use serde_json::Map; @@ -46,7 +46,7 @@ pub struct ImportMap { } impl ImportMap { - pub fn load(file_path: &str) -> Result<Self, ErrBox> { + pub fn load(file_path: &str) -> Result<Self, AnyError> { let file_url = ModuleSpecifier::resolve_url_or_path(file_path)?.to_string(); let resolved_path = std::env::current_dir().unwrap().join(file_path); debug!( @@ -67,7 +67,7 @@ impl ImportMap { ) })?; // The URL of the import map is the base URL for its values. - ImportMap::from_json(&file_url, &json_string).map_err(ErrBox::from) + ImportMap::from_json(&file_url, &json_string).map_err(AnyError::from) } pub fn from_json( |