Fix clippy warnings

This commit is contained in:
Bert Belder 2019-04-17 15:25:51 +02:00
parent 90c2b10f47
commit 8477daa8b9
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
9 changed files with 22 additions and 27 deletions

View file

@ -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.