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;