mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 18:12:39 +00:00
refactor: simplify hyper, http, h2 deps (#21715)
Main change is that: - "hyper" has been renamed to "hyper_v014" to signal that it's legacy - "hyper1" has been renamed to "hyper" and should be the default
This commit is contained in:
parent
33acd437f5
commit
c2414db1f6
33 changed files with 252 additions and 256 deletions
|
@ -142,7 +142,7 @@ fn get_url_parse_error_class(_error: &url::ParseError) -> &'static str {
|
|||
"URIError"
|
||||
}
|
||||
|
||||
fn get_hyper_error_class(_error: &hyper::Error) -> &'static str {
|
||||
fn get_hyper_error_class(_error: &hyper_v014::Error) -> &'static str {
|
||||
"Http"
|
||||
}
|
||||
|
||||
|
@ -175,9 +175,12 @@ pub fn get_error_class_name(e: &AnyError) -> Option<&'static str> {
|
|||
e.downcast_ref::<dlopen2::Error>()
|
||||
.map(get_dlopen_error_class)
|
||||
})
|
||||
.or_else(|| e.downcast_ref::<hyper::Error>().map(get_hyper_error_class))
|
||||
.or_else(|| {
|
||||
e.downcast_ref::<Arc<hyper::Error>>()
|
||||
e.downcast_ref::<hyper_v014::Error>()
|
||||
.map(get_hyper_error_class)
|
||||
})
|
||||
.or_else(|| {
|
||||
e.downcast_ref::<Arc<hyper_v014::Error>>()
|
||||
.map(|e| get_hyper_error_class(e))
|
||||
})
|
||||
.or_else(|| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue