Fix style issues reported by clippy and rustfmt.
This commit is contained in:
parent
324fc5dc0d
commit
1492147875
@ -15,7 +15,7 @@ pub enum Error {
|
||||
/// An error when serializing a query string value.
|
||||
SerdeUrlEncodedSerialize(SerdeUrlEncodedSerializeError),
|
||||
/// Queried endpoint requires authentication but was called on an anonymous client
|
||||
AuthenticationRequired
|
||||
AuthenticationRequired,
|
||||
}
|
||||
|
||||
impl From<HyperError> for Error {
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! Crate ruma_client is a [Matrix](https://matrix.org/) client library.
|
||||
//! Crate `ruma_client` is a [Matrix](https://matrix.org/) client library.
|
||||
|
||||
#![deny(missing_debug_implementations)]
|
||||
#![deny(missing_docs)]
|
||||
@ -15,7 +15,7 @@ extern crate url;
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
||||
use hyper::client::{Client as HyperClient, DefaultConnector, Request as HyperRequest};
|
||||
use hyper::client::{Client as HyperClient, HttpConnector, Request as HyperRequest};
|
||||
use hyper::Method as HyperMethod;
|
||||
use ruma_client_api::{Endpoint, Method};
|
||||
use ruma_client_api::unversioned::get_supported_versions;
|
||||
@ -34,7 +34,7 @@ mod session;
|
||||
#[derive(Debug)]
|
||||
pub struct Client {
|
||||
homeserver_url: Url,
|
||||
hyper: HyperClient<DefaultConnector>,
|
||||
hyper: HyperClient<HttpConnector>,
|
||||
session: Option<Session>,
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ impl Client {
|
||||
if let Some(ref session) = self.session {
|
||||
url.query_pairs_mut().append_pair("access_token", &session.access_token);
|
||||
} else {
|
||||
return Err(Error::AuthenticationRequired)
|
||||
return Err(Error::AuthenticationRequired);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ use std::marker::PhantomData;
|
||||
|
||||
use futures::{Async, Future, Poll, Stream};
|
||||
use hyper::client::{FutureResponse as HyperFutureResponse, Response as HyperResponse};
|
||||
use hyper::{Error as HyperError};
|
||||
use hyper::Error as HyperError;
|
||||
use hyper::header::Headers;
|
||||
use hyper::status::StatusCode;
|
||||
use hyper::HttpVersion;
|
||||
|
Loading…
x
Reference in New Issue
Block a user