summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index c43dbf6ee..5a4299214 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -119,7 +119,7 @@ pub fn resolve_module_spec(
// two-character sequence U+002E FULL STOP, U+002F SOLIDUS (./), or the
// three-character sequence U+002E FULL STOP, U+002E FULL STOP, U+002F
// SOLIDUS (../), return failure.
- if !specifier.starts_with("/")
+ if !specifier.starts_with('/')
&& !specifier.starts_with("./")
&& !specifier.starts_with("../")
{
@@ -158,8 +158,7 @@ impl Loader for Worker {
type Error = DenoError;
fn resolve(specifier: &str, referrer: &str) -> Result<String, Self::Error> {
- resolve_module_spec(specifier, referrer)
- .map_err(|url_err| DenoError::from(url_err))
+ resolve_module_spec(specifier, referrer).map_err(DenoError::from)
}
/// Given an absolute url, load its source code.