diff --git a/benches/bench.rs b/benches/bench.rs index a936fdd..b5a109e 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -1,12 +1,10 @@ #![feature(test)] #![allow(deprecated)] -#[macro_use] -extern crate smallvec; extern crate test; -use self::test::Bencher; -use smallvec::SmallVec; +use smallvec::{smallvec, SmallVec}; +use test::Bencher; const VEC_SIZE: usize = 16; const SPILLED_SIZE: usize = 100; diff --git a/fuzz/fuzz_targets/smallvec_ops.rs b/fuzz/fuzz_targets/smallvec_ops.rs index 9d0af34..5733da9 100644 --- a/fuzz/fuzz_targets/smallvec_ops.rs +++ b/fuzz/fuzz_targets/smallvec_ops.rs @@ -177,12 +177,9 @@ fn do_test_all(data: &[u8]) { do_test::<8>(data); } -#[cfg(feature = "afl")] -#[macro_use] -extern crate afl; #[cfg(feature = "afl")] fn main() { - fuzz!(|data| { + afl::fuzz!(|data| { // Remove the panic hook so we can actually catch panic // See https://github.com/rust-fuzz/afl.rs/issues/150 std::panic::set_hook(Box::new(|_| {})); @@ -190,13 +187,10 @@ fn main() { }); } -#[cfg(feature = "honggfuzz")] -#[macro_use] -extern crate honggfuzz; #[cfg(feature = "honggfuzz")] fn main() { loop { - fuzz!(|data| { + honggfuzz::fuzz!(|data| { // Remove the panic hook so we can actually catch panic // See https://github.com/rust-fuzz/afl.rs/issues/150 std::panic::set_hook(Box::new(|_| {})); diff --git a/src/tests.rs b/src/tests.rs index 683cb6a..81fc044 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -853,13 +853,10 @@ fn test_write() { assert_eq!(small_vec.as_ref(), data.as_ref()); } -#[cfg(feature = "serde")] -extern crate bincode; - #[cfg(feature = "serde")] #[test] fn test_serde() { - use self::bincode::{config, deserialize}; + use bincode::{config, deserialize}; let mut small_vec: SmallVec = SmallVec::new(); small_vec.push(1); let encoded = config().limit(100).serialize(&small_vec).unwrap();