diff options
author | Bert Belder <bertbelder@gmail.com> | 2019-04-17 15:25:51 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2019-04-17 15:35:46 +0200 |
commit | 8477daa8b970ae8ef042a5242aee705003b63fc1 (patch) | |
tree | 61fb35d8b367749c35df82f399c176edc7773464 /cli/worker.rs | |
parent | 90c2b10f47ab123f0ea7d71f3eeb3ee9172f7000 (diff) |
Fix clippy warnings
Diffstat (limited to 'cli/worker.rs')
-rw-r--r-- | cli/worker.rs | 5 |
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. |