Rename Error::ClientError and RefreshError::ConnectionError to HttpError.

PollError already contained an HttpError variant so this makes all
variants that contain a hyper::Error consistently named.
This commit is contained in:
Glenn Griffin
2019-11-21 12:53:02 -08:00
parent ae2258bc7a
commit fe5ea9bdb2
4 changed files with 11 additions and 25 deletions

View File

@@ -185,15 +185,8 @@ impl InstalledFlow {
{
let redirect_uri = self.flow_delegate.redirect_uri();
let request = Self::request_token(app_secret, authcode, redirect_uri, server_addr);
let resp = hyper_client
.request(request)
.await
.map_err(Error::ClientError)?;
let body = resp
.into_body()
.try_concat()
.await
.map_err(Error::ClientError)?;
let resp = hyper_client.request(request).await?;
let body = resp.into_body().try_concat().await?;
#[derive(Deserialize)]
struct JSONTokenResponse {