diff options
Diffstat (limited to 'cli/import_map.rs')
-rw-r--r-- | cli/import_map.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/import_map.rs b/cli/import_map.rs index 1f136a3e9..abe9835f8 100644 --- a/cli/import_map.rs +++ b/cli/import_map.rs @@ -3,6 +3,8 @@ use indexmap::IndexMap; use serde_json::Map; use serde_json::Value; use std::cmp::Ordering; +use std::error::Error; +use std::fmt; use std::fs; use url::Url; @@ -19,6 +21,14 @@ impl ImportMapError { } } +impl fmt::Display for ImportMapError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.pad(&self.msg) + } +} + +impl Error for ImportMapError {} + // NOTE: here is difference between deno and reference implementation - deno currently // can't resolve URL with other schemes (eg. data:, about:, blob:) const SUPPORTED_FETCH_SCHEMES: [&str; 3] = ["http", "https", "file"]; |