From 1492147875e85eb08593f5ba81b7426226a5d026 Mon Sep 17 00:00:00 2001 From: Jimmy Cuadra Date: Mon, 16 Jan 2017 23:15:25 -0800 Subject: [PATCH] Fix style issues reported by clippy and rustfmt. --- src/error.rs | 2 +- src/lib.rs | 8 ++++---- src/response.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/error.rs b/src/error.rs index ee2f1483..aa9fafcf 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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 for Error { diff --git a/src/lib.rs b/src/lib.rs index f627ae26..2004221d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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, + hyper: HyperClient, session: Option, } @@ -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); } } diff --git a/src/response.rs b/src/response.rs index 9ab4f40d..cb9753a0 100644 --- a/src/response.rs +++ b/src/response.rs @@ -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;