From c9579984554a59ed11f99e11e8064333172fefb2 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 12 Nov 2019 01:20:20 +0100 Subject: [PATCH] Add #![warn(rust_2018_idioms)], fix warning --- src/error.rs | 2 +- src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index b3da1b84..289cbef2 100644 --- a/src/error.rs +++ b/src/error.rs @@ -14,7 +14,7 @@ use serde_urlencoded::ser::Error as SerdeUrlEncodedSerializeError; pub struct Error(pub(crate) InnerError); impl Display for Error { - fn fmt(&self, f: &mut Formatter) -> FmtResult { + fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { let message = match self.0 { InnerError::AuthenticationRequired => "The queried endpoint requires authentication but was called with an anonymous client.", InnerError::Hyper(_) => "An HTTP error occurred.", diff --git a/src/lib.rs b/src/lib.rs index 415be2ea..5275c05e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,6 +75,7 @@ //! # ; //! ``` +#![warn(rust_2018_idioms)] #![deny( missing_copy_implementations, missing_debug_implementations,