From 9dd66dfc223b284a9da981c64eea6e1bca1d3a57 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 10 Jun 2018 10:24:34 -0700 Subject: [PATCH] better name for error --- MIGRATION.md | 3 ++- src/client/connector.rs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 91f8a8007..628f0590e 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -44,7 +44,8 @@ * Removed deprecated `HttpServer::threads()`, use [HttpServer::workers()](https://actix.rs/actix-web/actix_web/server/struct.HttpServer.html#method.workers) instead. - +* Renamed `client::ClientConnectorError::Connector` to + `client::ClientConnectorError::Resolver` ## 0.6 diff --git a/src/client/connector.rs b/src/client/connector.rs index 4408818c0..5b8444868 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -137,9 +137,9 @@ pub enum ClientConnectorError { #[fail(display = "{}", _0)] SslError(#[cause] TlsError), - /// Connection error + /// Resolver error #[fail(display = "{}", _0)] - Connector(#[cause] ResolverError), + Resolver(#[cause] ResolverError), /// Connection took too long #[fail(display = "Timeout while establishing connection")] @@ -158,7 +158,7 @@ impl From for ClientConnectorError { fn from(err: ResolverError) -> ClientConnectorError { match err { ResolverError::Timeout => ClientConnectorError::Timeout, - _ => ClientConnectorError::Connector(err), + _ => ClientConnectorError::Resolver(err), } } }