File tree Expand file tree Collapse file tree 3 files changed +5
-16
lines changed
Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Original file line number Diff line number Diff line change 11#![ feature( test) ]
22#![ allow( deprecated) ]
33
4- #[ macro_use]
5- extern crate smallvec;
64extern crate test;
75
8- use self :: test :: Bencher ;
9- use smallvec :: SmallVec ;
6+ use smallvec :: { smallvec , SmallVec } ;
7+ use test :: Bencher ;
108
119const VEC_SIZE : usize = 16 ;
1210const SPILLED_SIZE : usize = 100 ;
Original file line number Diff line number Diff line change @@ -177,26 +177,20 @@ fn do_test_all(data: &[u8]) {
177177 do_test :: < 8 > ( data) ;
178178}
179179
180- #[ cfg( feature = "afl" ) ]
181- #[ macro_use]
182- extern crate afl;
183180#[ cfg( feature = "afl" ) ]
184181fn main ( ) {
185- fuzz ! ( |data| {
182+ afl :: fuzz!( |data| {
186183 // Remove the panic hook so we can actually catch panic
187184 // See https://github.com/rust-fuzz/afl.rs/issues/150
188185 std:: panic:: set_hook( Box :: new( |_| { } ) ) ;
189186 do_test_all( data) ;
190187 } ) ;
191188}
192189
193- #[ cfg( feature = "honggfuzz" ) ]
194- #[ macro_use]
195- extern crate honggfuzz;
196190#[ cfg( feature = "honggfuzz" ) ]
197191fn main ( ) {
198192 loop {
199- fuzz ! ( |data| {
193+ honggfuzz :: fuzz!( |data| {
200194 // Remove the panic hook so we can actually catch panic
201195 // See https://github.com/rust-fuzz/afl.rs/issues/150
202196 std:: panic:: set_hook( Box :: new( |_| { } ) ) ;
Original file line number Diff line number Diff line change @@ -853,13 +853,10 @@ fn test_write() {
853853 assert_eq ! ( small_vec. as_ref( ) , data. as_ref( ) ) ;
854854}
855855
856- #[ cfg( feature = "serde" ) ]
857- extern crate bincode;
858-
859856#[ cfg( feature = "serde" ) ]
860857#[ test]
861858fn test_serde ( ) {
862- use self :: bincode:: { config, deserialize} ;
859+ use bincode:: { config, deserialize} ;
863860 let mut small_vec: SmallVec < i32 , 2 > = SmallVec :: new ( ) ;
864861 small_vec. push ( 1 ) ;
865862 let encoded = config ( ) . limit ( 100 ) . serialize ( & small_vec) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments