summaryrefslogtreecommitdiff
path: root/core/module_specifier.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/module_specifier.rs')
-rw-r--r--core/module_specifier.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/module_specifier.rs b/core/module_specifier.rs
index 9194b9082..dbab0ce9b 100644
--- a/core/module_specifier.rs
+++ b/core/module_specifier.rs
@@ -78,7 +78,7 @@ impl ModuleSpecifier {
|| specifier.starts_with("./")
|| specifier.starts_with("../")) =>
{
- Err(ImportPrefixMissing(specifier.to_string()))?
+ return Err(ImportPrefixMissing(specifier.to_string()))
}
// 3. Return the result of applying the URL parser to specifier with base
@@ -103,7 +103,7 @@ impl ModuleSpecifier {
// it being relative, always return the original error. We don't want to
// return `ImportPrefixMissing` or `InvalidBaseUrl` if the real
// problem lies somewhere else.
- Err(err) => Err(InvalidUrl(err))?,
+ Err(err) => return Err(InvalidUrl(err)),
};
Ok(ModuleSpecifier(url))