From a3d9aa30264f9b4b5c1b6da603e698e7da47c112 Mon Sep 17 00:00:00 2001 From: Abhishek Chanda Date: Sun, 25 Oct 2015 13:43:52 -0700 Subject: [PATCH] Use clippy --- Cargo.toml | 7 +++++++ src/lib.rs | 3 +++ 2 files changed, 10 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index f7b07a4..890bb47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,3 +5,10 @@ authors = ["Abhishek Chanda "] description = "A library to work with IP CIDRs in Rust, heavily WIP" license = "Apache-2.0" repository = "https://github.com/achanda/ipnetwork" + +[dependencies] +clippy = {version = "0.0.21", optional = true} + +[features] +default = [] +dev = ["clippy"] diff --git a/src/lib.rs b/src/lib.rs index b3fdba0..6b75570 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +#![cfg_attr(feature = "dev", allow(unstable_features))] +#![cfg_attr(feature = "dev", feature(plugin))] +#![cfg_attr(feature = "dev", plugin(clippy))] #![crate_type = "lib"] #![feature(ip_addr)] #[allow(dead_code)]