Add #![warn(rust_2018_idioms)], fix warning

This commit is contained in:
Jonas Platte 2019-11-12 01:20:20 +01:00
parent 82f652abb4
commit c957998455
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
2 changed files with 2 additions and 1 deletions

View File

@ -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.",

View File

@ -75,6 +75,7 @@
//! # ;
//! ```
#![warn(rust_2018_idioms)]
#![deny(
missing_copy_implementations,
missing_debug_implementations,