File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -1200,19 +1200,6 @@ quickcheck! {
1200
1200
assert_eq!( lookup_grouping_map, lookup_grouping_map_by) ;
1201
1201
}
1202
1202
1203
- fn correct_grouping_map_by_modulo_key( a: Vec <u8 >, modulo: u8 ) -> ( ) {
1204
- let modulo = if modulo == 0 { 1 } else { modulo } ; // Avoid `% 0`
1205
- let count = a. len( ) ;
1206
- let lookup = a. into_iter( ) . into_grouping_map_by( |i| i % modulo) . collect:: <Vec <_>>( ) ;
1207
-
1208
- assert_eq!( lookup. len( ) , ( 0 ..modulo) . filter( |i| lookup. contains_key( i) ) . count( ) ) ;
1209
- assert_eq!( lookup. values( ) . flat_map( |vals| vals. iter( ) ) . count( ) , count) ;
1210
-
1211
- for ( & key, vals) in lookup. iter( ) {
1212
- assert!( vals. iter( ) . all( |& val| val % modulo == key) ) ;
1213
- }
1214
- }
1215
-
1216
1203
fn correct_grouping_map_by_aggregate_modulo_key( a: Vec <u8 >, modulo: u8 ) -> ( ) {
1217
1204
let modulo = if modulo < 2 { 2 } else { modulo } as u64 ; // Avoid `% 0`
1218
1205
let lookup = a. iter( )
You can’t perform that action at this time.
0 commit comments