File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,10 @@ impl arbitrary::Arbitrary<'_> for ArbitraryRoundTrip {
7676 }
7777}
7878
79- fuzz_target ! ( |data: ( ArbitrarySamples , ArbitraryRoundTrip ) | {
79+ fuzz_target ! ( |data: ( ArbitraryRoundTrip , ArbitrarySamples ) | {
8080 use libzstd_rs_sys:: * ;
8181
82- let ( samples , data ) = data;
82+ let ( data , samples ) = data;
8383
8484 let src = samples. src;
8585
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ impl arbitrary::Arbitrary<'_> for ArbitrarySamples {
1717
1818 let dict_size = max ( src. len ( ) / 8 , 1024 ) ;
1919 let total_sample_size = dict_size * 11 ;
20- let nb_samples = u. int_in_range ( 1 ..=100 ) ?;
20+ // pick number of samples based on remaining randomness that is left
21+ let nb_samples = u. arbitrary_len :: < usize > ( ) ?;
2122
2223 // generate random samples from src
2324 let mut samples = Vec :: with_capacity ( total_sample_size) ;
You can’t perform that action at this time.
0 commit comments