Skip to content

Commit

Permalink
fix(hyper): update to hyper v0.4.0
Browse files Browse the repository at this point in the history
* `hyper::HttpError` is now the more versatile `hyper::Error`
  • Loading branch information
Byron committed May 8, 2015
1 parent e519cf0 commit 7383f5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions src/refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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),
}
}

Expand Down

0 comments on commit 7383f5e

Please sign in to comment.