From ea98da01ee44d5c719964077f94ea8893797e4fc Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Sat, 31 Oct 2015 17:02:42 +1100 Subject: [PATCH] =?UTF-8?q?test(global):=20enable=20clippy=20lints=20behin?= =?UTF-8?q?d=20=E2=80=9Cdev=E2=80=9D=20feature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 2 ++ src/lib.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a9084cc..7fd884a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,10 @@ license = "MIT" mio = "^0.4.3" nix = "^0.4.1" libc = "^0.1.10" +clippy = {version = "^0.0.22", optional = true} [features] # Feature to disable any tests which rely on hardware availability # eg: tests which attempt to create a BluetoothSocket. test_without_hardware = [] +dev = ["clippy"] diff --git a/src/lib.rs b/src/lib.rs index 2642eae..13d23c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,7 @@ +#![cfg_attr(feature = "dev", allow(unstable_features))] +#![cfg_attr(feature = "dev", feature(plugin))] +#![cfg_attr(feature = "dev", plugin(clippy))] + extern crate mio; extern crate nix; extern crate libc;