summaryrefslogtreecommitdiff
path: root/cli/deno_error.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2019-12-30 14:57:17 +0100
committerGitHub <noreply@github.com>2019-12-30 14:57:17 +0100
commit46d76a7562025374600a7f866dfc68c1b7e268e9 (patch)
tree0681d383781d8a28ac7ea23d75f22b1faeea0208 /cli/deno_error.rs
parentdf1665a8fc92168c3eb115a768ecfeccbe575e18 (diff)
upgrade: Tokio 0.2 (#3418)
Diffstat (limited to 'cli/deno_error.rs')
-rw-r--r--cli/deno_error.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/deno_error.rs b/cli/deno_error.rs
index 8d0eea201..d74483df9 100644
--- a/cli/deno_error.rs
+++ b/cli/deno_error.rs
@@ -211,6 +211,7 @@ impl GetErrorKind for url::ParseError {
}
RelativeUrlWithoutBase => ErrorKind::RelativeUrlWithoutBase,
SetHostOnCannotBeABaseUrl => ErrorKind::SetHostOnCannotBeABaseUrl,
+ _ => ErrorKind::Other,
}
}
}
@@ -231,7 +232,7 @@ impl GetErrorKind for reqwest::Error {
fn kind(&self) -> ErrorKind {
use self::GetErrorKind as Get;
- match self.get_ref() {
+ match self.source() {
Some(err_ref) => None
.or_else(|| err_ref.downcast_ref::<hyper::Error>().map(Get::kind))
.or_else(|| err_ref.downcast_ref::<url::ParseError>().map(Get::kind))
@@ -242,7 +243,7 @@ impl GetErrorKind for reqwest::Error {
.map(Get::kind)
})
.unwrap_or_else(|| ErrorKind::HttpOther),
- _ => ErrorKind::HttpOther,
+ None => ErrorKind::HttpOther,
}
}
}