@@ -239,8 +239,8 @@ impl<'trie, V: Clone + Send + Sync + Unpin + 'trie, A: Allocator + 'trie> Zipper
239239 self . ensure_descend_next_factor ( ) ;
240240 result
241241 }
242- fn descend_until ( & mut self , dst : Option < & mut Vec < u8 > > ) -> bool {
243- let result = self . z . descend_until ( dst ) ;
242+ fn descend_until < W : std :: io :: Write > ( & mut self , desc_bytes : W ) -> bool {
243+ let result = self . z . descend_until ( desc_bytes ) ;
244244 self . ensure_descend_next_factor ( ) ;
245245 result
246246 }
@@ -729,19 +729,19 @@ impl<'trie, PrimaryZ, SecondaryZ, V> ZipperMoving for ProductZipperG<'trie, Prim
729729 fn descend_first_byte ( & mut self ) -> Option < u8 > {
730730 self . descend_indexed_byte ( 0 )
731731 }
732- fn descend_until ( & mut self , dst : Option < & mut Vec < u8 > > ) -> bool {
732+ fn descend_until < W : std :: io :: Write > ( & mut self , desc_bytes : W ) -> bool {
733733 self . enter_factors ( ) ;
734734 let rv = if let Some ( idx) = self . factor_idx ( false ) {
735735 let zipper = & mut self . secondary [ idx] ;
736736 let before = zipper. path ( ) . len ( ) ;
737- let rv = zipper. descend_until ( dst ) ;
737+ let rv = zipper. descend_until ( desc_bytes ) ;
738738 let path = zipper. path ( ) ;
739739 if path. len ( ) > before {
740740 self . primary . descend_to ( & path[ before..] ) ;
741741 }
742742 rv
743743 } else {
744- self . primary . descend_until ( dst )
744+ self . primary . descend_until ( desc_bytes )
745745 } ;
746746 self . enter_factors ( ) ;
747747 rv
@@ -1385,6 +1385,10 @@ mod tests {
13851385 // together, so the resulting virtual product trie is just one long path with repetitions,
13861386 // and then validate that ascend, ascend_until, ascend_until_branch, etc. all do the right
13871387 // thing traversing across multiple factors, not stopping spuriously at the factor stitch points.
1388+ //
1389+ // UPDATE, Also test `descend_until` in this case, because the correct behavior should be seamlessly
1390+ // descend flowing across multiple factor zippers in one call, and some of the impls don't appear to
1391+ // do that.
13881392
13891393 }
13901394 // --- END OF MACRO GENERATED MOD ---
0 commit comments