style(lib): address clippy code style warnings

* Remove unnecessary return statements.

* Combine identical `match` arms.

* Collapse nested conditional.

* Use `assert_ne` where applicable.

* Lifetime elision.
This commit is contained in:
Corey Farwell
2017-06-12 23:16:20 -04:00
committed by Sean McArthur
parent 5d19ef88b4
commit 1059eb349a
14 changed files with 38 additions and 49 deletions

View File

@@ -76,7 +76,7 @@ impl Client<HttpConnector, http::Body> {
impl<C, B> Client<C, B> {
/// Return a reference to a handle to the event loop this Client is associated with.
#[inline]
pub fn handle<'a>(&'a self) -> &'a Handle {
pub fn handle(&self) -> &Handle {
&self.handle
}