From c2414db1f68d27db8ca6f192f0ff877f1394164c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 27 Dec 2023 17:59:57 +0100 Subject: 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 --- runtime/errors.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'runtime/errors.rs') diff --git a/runtime/errors.rs b/runtime/errors.rs index c05e5bd62..96a827dd3 100644 --- a/runtime/errors.rs +++ b/runtime/errors.rs @@ -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::() .map(get_dlopen_error_class) }) - .or_else(|| e.downcast_ref::().map(get_hyper_error_class)) .or_else(|| { - e.downcast_ref::>() + e.downcast_ref::() + .map(get_hyper_error_class) + }) + .or_else(|| { + e.downcast_ref::>() .map(|e| get_hyper_error_class(e)) }) .or_else(|| { -- cgit v1.2.3