Enable clippy_pedantic in serde_test

This commit is contained in:
David Tolnay 2017-11-06 22:31:35 -08:00
parent f4ae0888c8
commit 16787318d1
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 10 additions and 3 deletions

View File

@ -17,13 +17,13 @@ pub struct Error {
}
impl ser::Error for Error {
fn custom<T: Display>(msg: T) -> Error {
fn custom<T: Display>(msg: T) -> Self {
Error { msg: msg.to_string() }
}
}
impl de::Error for Error {
fn custom<T: Display>(msg: T) -> Error {
fn custom<T: Display>(msg: T) -> Self {
Error { msg: msg.to_string() }
}
}

View File

@ -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;