summaryrefslogtreecommitdiff
path: root/src/http_util.rs
diff options
context:
space:
mode:
authorAndy Hayden <andyhayden1@gmail.com>2018-11-04 06:04:24 -0800
committerRyan Dahl <ry@tinyclouds.org>2018-11-04 06:04:24 -0800
commit1241b8e9babfec3e87c8958e2065966ee5dd1335 (patch)
treeb6d0892ac841a70014dc95b2517058ec008ac70d /src/http_util.rs
parent765f229357587fb66dfe04d3c48d62c6aae9ce71 (diff)
Fix clippy warnings (#1149)
Run with: cargo clippy https://github.com/rust-lang-nursery/rust-clippy
Diffstat (limited to 'src/http_util.rs')
-rw-r--r--src/http_util.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http_util.rs b/src/http_util.rs
index 9c5ff9529..3c375b999 100644
--- a/src/http_util.rs
+++ b/src/http_util.rs
@@ -37,7 +37,7 @@ pub fn fetch_sync_string(module_name: &str) -> DenoResult<(String, String)> {
let url = maybe_url.expect("target url should not be None");
client
.get(url)
- .map_err(|err| DenoError::from(err))
+ .map_err(DenoError::from)
.and_then(|response| {
if response.status().is_redirection() {
let new_url_string = response
@@ -72,7 +72,7 @@ pub fn fetch_sync_string(module_name: &str) -> DenoResult<(String, String)> {
.into_body()
.concat2()
.map(|body| String::from_utf8(body.to_vec()).unwrap())
- .map_err(|err| DenoError::from(err));
+ .map_err(DenoError::from);
body.join(future::ok(content_type))
}).and_then(|(body_string, maybe_content_type)| {
future::ok((body_string, maybe_content_type.unwrap()))