From 5c202dac49f83fe494be5fbc3910327f76442abd Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 12 Nov 2019 01:17:52 +0100 Subject: [PATCH] Add #![warn(rust_2018_idioms)], fix warning --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index acc02fa9..8491de61 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ //! Such types can then be used by client code to make requests, and by server code to fulfill //! those requests. +#![warn(rust_2018_idioms)] #![deny( missing_copy_implementations, missing_debug_implementations, @@ -62,7 +63,7 @@ pub trait Endpoint: TryInto>, Error = Error> { 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::Http(_) => "An error converting to or from `http` types occurred.".into(), InnerError::Io(_) => "An I/O error occurred.".into(),