diff --git a/.travis.yml b/.travis.yml index d32bf418..583403c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,9 @@ sudo: false cache: cargo +env: # important! + global: RUSTFLAGS=-Dwarnings + matrix: include: - rust: stable diff --git a/src/error.rs b/src/error.rs index 3b31a103..5d480272 100644 --- a/src/error.rs +++ b/src/error.rs @@ -66,6 +66,7 @@ impl Error { } impl error::Error for Error { + #[allow(deprecated)] fn description(&self) -> &str { use self::ErrorKind::*; diff --git a/src/header/name.rs b/src/header/name.rs index 8e871ecf..87b5a195 100644 --- a/src/header/name.rs +++ b/src/header/name.rs @@ -2002,6 +2002,7 @@ impl fmt::Debug for InvalidHeaderName { } impl fmt::Display for InvalidHeaderName { + #[allow(deprecated)] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.description().fmt(f) } diff --git a/src/header/value.rs b/src/header/value.rs index c3096a15..7b79224c 100644 --- a/src/header/value.rs +++ b/src/header/value.rs @@ -568,6 +568,7 @@ impl fmt::Debug for InvalidHeaderValue { } impl fmt::Display for InvalidHeaderValue { + #[allow(deprecated)] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.description().fmt(f) } @@ -580,6 +581,7 @@ impl Error for InvalidHeaderValue { } impl fmt::Display for ToStrError { + #[allow(deprecated)] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.description().fmt(f) } diff --git a/src/lib.rs b/src/lib.rs index c5a43699..b3989d41 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -158,7 +158,7 @@ //! assert_eq!(uri.query(), None); //! ``` -#![deny(warnings, missing_docs, missing_debug_implementations)] +#![warn(missing_docs, missing_debug_implementations)] #[cfg(test)] #[macro_use] diff --git a/src/method.rs b/src/method.rs index 6a8ed142..67e51632 100644 --- a/src/method.rs +++ b/src/method.rs @@ -364,6 +364,7 @@ impl fmt::Debug for InvalidMethod { } impl fmt::Display for InvalidMethod { + #[allow(deprecated)] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.description()) } diff --git a/src/status.rs b/src/status.rs index 5b4c41f2..f6121444 100644 --- a/src/status.rs +++ b/src/status.rs @@ -514,6 +514,7 @@ impl fmt::Debug for InvalidStatusCode { } impl fmt::Display for InvalidStatusCode { + #[allow(deprecated)] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.description()) } diff --git a/src/uri/mod.rs b/src/uri/mod.rs index 066a966b..4319ad35 100644 --- a/src/uri/mod.rs +++ b/src/uri/mod.rs @@ -1026,6 +1026,7 @@ impl From for InvalidUriParts { } impl fmt::Display for InvalidUri { + #[allow(deprecated)] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.description().fmt(f) } @@ -1056,6 +1057,7 @@ impl fmt::Display for InvalidUriParts { } impl Error for InvalidUriParts { + #[allow(deprecated)] fn description(&self) -> &str { self.0.description() }