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

@@ -153,7 +153,7 @@ impl DeviceFlow {
.header(header::CONTENT_TYPE, "application/x-www-form-urlencoded")
.body(hyper::Body::from(req))
.unwrap();
let resp = client.request(req).await.map_err(Error::ClientError)?;
let resp = client.request(req).await?;
// This return type is defined in https://tools.ietf.org/html/draft-ietf-oauth-device-flow-15#section-3.2
// The alias is present as Google use a non-standard name for verification_uri.
// According to the standard interval is optional, however, all tested implementations provide it.