From 68b74c5ea95f5cfdf8c8cb07c91910d2c31d6d13 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 8 May 2021 14:49:42 +0200 Subject: [PATCH] Rename HttpError::{FromHttpResponse => ClientApi} --- matrix_sdk/src/client.rs | 8 ++++---- matrix_sdk/src/error.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index a6d9b651..3c2d61ce 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -2697,13 +2697,13 @@ mod test { .create(); if let Err(err) = client.login("example", "wordpass", None, None).await { - if let crate::Error::Http(HttpError::FromHttpResponse( - crate::FromHttpResponseError::Http(crate::ServerError::Known(crate::api::Error { + if let crate::Error::Http(HttpError::ClientApi(crate::FromHttpResponseError::Http( + crate::ServerError::Known(crate::api::Error { kind, message, status_code, - })), - )) = err + }), + ))) = err { if let crate::api::error::ErrorKind::Forbidden = kind { } else { diff --git a/matrix_sdk/src/error.rs b/matrix_sdk/src/error.rs index 3fd66c24..568baeb8 100644 --- a/matrix_sdk/src/error.rs +++ b/matrix_sdk/src/error.rs @@ -57,7 +57,7 @@ pub enum HttpError { /// An error converting between ruma_client_api types and Hyper types. #[error(transparent)] - FromHttpResponse(#[from] FromHttpResponseError), + ClientApi(#[from] FromHttpResponseError), /// An error converting between ruma_client_api types and Hyper types. #[error(transparent)]