mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-03 01:46:18 +01:00
fix(hyper): update to hyper v0.4.0
* `hyper::HttpError` is now the more versatile `hyper::Error`
This commit is contained in:
@@ -71,7 +71,7 @@ impl fmt::Display for PollInformation {
|
||||
/// Encapsulates all possible results of the `request_token(...)` operation
|
||||
pub enum RequestError {
|
||||
/// Indicates connection failure
|
||||
HttpError(hyper::HttpError),
|
||||
HttpError(hyper::Error),
|
||||
/// The OAuth client was not found
|
||||
InvalidClient,
|
||||
/// Some requested scopes were invalid. String contains the scopes as part of
|
||||
@@ -116,7 +116,7 @@ impl fmt::Display for RequestError {
|
||||
#[derive(Debug)]
|
||||
pub enum PollError {
|
||||
/// Connection failure - retry if you think it's worth it
|
||||
HttpError(hyper::HttpError),
|
||||
HttpError(hyper::Error),
|
||||
/// indicates we are expired, including the expiration date
|
||||
Expired(DateTime<UTC>),
|
||||
/// Indicates that the user declined access. String is server response
|
||||
|
||||
@@ -395,7 +395,7 @@ pub trait AuthenticatorDelegate {
|
||||
/// Called whenever there is an HttpError, usually if there are network problems.
|
||||
///
|
||||
/// Return retry information.
|
||||
fn connection_error(&mut self, &hyper::HttpError) -> Retry {
|
||||
fn connection_error(&mut self, &hyper::Error) -> Retry {
|
||||
Retry::Abort
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ pub struct RefreshFlow<C> {
|
||||
/// All possible outcomes of the refresh flow
|
||||
pub enum RefreshResult {
|
||||
/// Indicates connection failure
|
||||
Error(hyper::HttpError),
|
||||
Error(hyper::Error),
|
||||
/// The server did not answer with a new token, providing the server message
|
||||
RefreshError(String, Option<String>),
|
||||
/// The refresh operation finished successfully, providing a new `Token`
|
||||
@@ -37,7 +37,7 @@ impl<C> RefreshFlow<C>
|
||||
pub fn new(client: C) -> RefreshFlow<C> {
|
||||
RefreshFlow {
|
||||
client: client,
|
||||
result: RefreshResult::Error(hyper::HttpError::HttpStatusError),
|
||||
result: RefreshResult::Error(hyper::Error::TooLarge),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user