Rename HttpError::{FromHttpResponse => ClientApi}

This commit is contained in:
Jonas Platte 2021-05-08 14:49:42 +02:00
parent efe5b1e538
commit 68b74c5ea9
No known key found for this signature in database
GPG key ID: 7D261D771D915378
2 changed files with 5 additions and 5 deletions

View file

@ -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 {

View file

@ -57,7 +57,7 @@ pub enum HttpError {
/// An error converting between ruma_client_api types and Hyper types.
#[error(transparent)]
FromHttpResponse(#[from] FromHttpResponseError<RumaClientError>),
ClientApi(#[from] FromHttpResponseError<RumaClientError>),
/// An error converting between ruma_client_api types and Hyper types.
#[error(transparent)]