From c1745cde82c7f20bff3b7cd8411834af6df25d14 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 19 Jul 2018 00:02:08 -0700 Subject: [PATCH] Remove import of serde --- clippy_lints/src/lib.rs | 3 --- clippy_lints/src/utils/conf.rs | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 367a10360..7eaa1de3c 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -24,9 +24,6 @@ use rustc_plugin; #[macro_use] extern crate matches as matches_macro; -#[macro_use] -extern crate serde_derive; - #[macro_use] extern crate lazy_static; diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs index 05abdd2f1..e18245c3f 100644 --- a/clippy_lints/src/utils/conf.rs +++ b/clippy_lints/src/utils/conf.rs @@ -7,7 +7,6 @@ use std::io::Read; use syntax::{ast, codemap}; use toml; use std::sync::Mutex; - /// Get the configuration file from arguments. pub fn file_from_args( args: &[codemap::Spanned], @@ -86,10 +85,10 @@ macro_rules! define_Conf { // #[allow(rust_2018_idioms)] mod helpers { + use serde_derive::Deserialize; /// Type used to store lint configuration. #[derive(Deserialize)] - #[serde(rename_all="kebab-case")] - #[serde(deny_unknown_fields)] + #[serde(rename_all="kebab-case", deny_unknown_fields)] pub struct Conf { $(#[$doc] #[serde(default=$rust_name_str)] #[serde(with=$rust_name_str)] pub $rust_name: define_Conf!(TY $($ty)+),)+