From 16787318d1d4f11cf902d4ca7c565a105d8125ad Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 6 Nov 2017 22:31:35 -0800 Subject: [PATCH] Enable clippy_pedantic in serde_test --- serde_test/src/error.rs | 4 ++-- serde_test/src/lib.rs | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/serde_test/src/error.rs b/serde_test/src/error.rs index b02e1d7c..8c529121 100644 --- a/serde_test/src/error.rs +++ b/serde_test/src/error.rs @@ -17,13 +17,13 @@ pub struct Error { } impl ser::Error for Error { - fn custom(msg: T) -> Error { + fn custom(msg: T) -> Self { Error { msg: msg.to_string() } } } impl de::Error for Error { - fn custom(msg: T) -> Error { + fn custom(msg: T) -> Self { Error { msg: msg.to_string() } } } diff --git a/serde_test/src/lib.rs b/serde_test/src/lib.rs index c6eeb4c6..e7879379 100644 --- a/serde_test/src/lib.rs +++ b/serde_test/src/lib.rs @@ -157,8 +157,15 @@ #![doc(html_root_url = "https://docs.rs/serde_test/1.0.18")] -#![cfg_attr(feature = "cargo-clippy", deny(clippy))] +#![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))] +// Whitelisted clippy lints #![cfg_attr(feature = "cargo-clippy", allow(float_cmp))] +// Whitelisted clippy_pedantic lints +#![cfg_attr(feature = "cargo-clippy", allow( + missing_docs_in_private_items, + stutter, + use_self, +))] #[macro_use] extern crate serde;