@@ -243,16 +243,15 @@ impl ClamTree {
243243 /// The one construction core, parameterised over any callable. Both
244244 /// public arms land here.
245245 fn build_core (
246- data : & [ u8 ] , vec_len : usize , count : usize , config : & BuildConfig ,
247- dist : & dyn Fn ( & [ u8 ] , & [ u8 ] ) -> u64 , carrier : TreeDistance ,
246+ data : & [ u8 ] , vec_len : usize , count : usize , config : & BuildConfig , dist : & dyn Fn ( & [ u8 ] , & [ u8 ] ) -> u64 ,
247+ carrier : TreeDistance ,
248248 ) -> Self {
249249 let tmp = Self :: build_core_nodes ( data, vec_len, count, config, dist) ;
250250 Self :: assemble ( tmp, carrier)
251251 }
252252
253253 fn build_core_nodes (
254- data : & [ u8 ] , vec_len : usize , count : usize , config : & BuildConfig ,
255- dist : & dyn Fn ( & [ u8 ] , & [ u8 ] ) -> u64 ,
254+ data : & [ u8 ] , vec_len : usize , count : usize , config : & BuildConfig , dist : & dyn Fn ( & [ u8 ] , & [ u8 ] ) -> u64 ,
256255 ) -> ( Vec < Cluster > , Vec < usize > ) {
257256 // Order and constants are the ORIGINAL build's, verbatim: assert
258257 // before the empty return, the 0xDEAD_BEEF_CAFE_BABE seed, the
@@ -3142,7 +3141,9 @@ mod tests {
31423141 fn arm_test_data ( ) -> Vec < u8 > {
31433142 // Deterministic, structured enough to force real splits.
31443143 let mut rng = SplitMix64 :: new ( 0x51_7EED ) ;
3145- ( 0 ..64 * 32 ) . map ( |_| ( rng. next_u64 ( ) & 0xFF ) as u8 ) . collect ( )
3144+ ( 0 ..64 * 32 )
3145+ . map ( |_| ( rng. next_u64 ( ) & 0xFF ) as u8 )
3146+ . collect ( )
31463147 }
31473148
31483149 fn assert_same_tree ( a : & ClamTree , b : & ClamTree ) {
@@ -3163,7 +3164,10 @@ mod tests {
31633164 #[ test]
31643165 fn the_two_arms_build_the_identical_tree ( ) {
31653166 let data = arm_test_data ( ) ;
3166- let cfg = BuildConfig { min_cardinality : 4 , ..Default :: default ( ) } ;
3167+ let cfg = BuildConfig {
3168+ min_cardinality : 4 ,
3169+ ..Default :: default ( )
3170+ } ;
31673171 let ptr = ClamTree :: build_with_fn ( & data, 32 , 64 , & cfg, tail16_hamming) ;
31683172 let dy = ClamTree :: build_with_distance ( & data, 32 , 64 , & cfg, TailHamming { from : 16 } ) ;
31693173 assert_same_tree ( & ptr, & dy) ;
@@ -3189,7 +3193,10 @@ mod tests {
31893193 }
31903194 }
31913195 let data = arm_test_data ( ) ;
3192- let cfg = BuildConfig { min_cardinality : 4 , ..Default :: default ( ) } ;
3196+ let cfg = BuildConfig {
3197+ min_cardinality : 4 ,
3198+ ..Default :: default ( )
3199+ } ;
31933200 assert ! ( ClamTree :: build_with_fn( & data, 32 , 64 , & cfg, hamming_inline) . is_metric( ) ) ;
31943201 assert ! ( !ClamTree :: build_with_distance( & data, 32 , 64 , & cfg, NotAMetric ) . is_metric( ) ) ;
31953202 }
@@ -3200,7 +3207,10 @@ mod tests {
32003207 #[ should_panic( expected = "build_with_distance" ) ]
32013208 fn the_fn_pointer_accessor_refuses_the_stateful_arm ( ) {
32023209 let data = arm_test_data ( ) ;
3203- let cfg = BuildConfig { min_cardinality : 4 , ..Default :: default ( ) } ;
3210+ let cfg = BuildConfig {
3211+ min_cardinality : 4 ,
3212+ ..Default :: default ( )
3213+ } ;
32043214 let t = ClamTree :: build_with_distance ( & data, 32 , 64 , & cfg, TailHamming { from : 0 } ) ;
32053215 let _ = t. distance_fn ( ) ;
32063216 }
0 commit comments