File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -334,14 +334,14 @@ impl<'t, 's: 't> RecursiveChunker<'s> {
334334 return ;
335335 }
336336 let mut start_pos = chunks[ 0 ] . start ;
337- for i in 1 ..chunks. len ( ) - 1 {
338- let chunk = & chunks[ i] ;
339- if chunk. end - start_pos > self . chunk_size {
337+ for i in 0 ..chunks. len ( ) - 1 {
338+ let next_chunk = & chunks[ i + 1 ] ;
339+ if next_chunk. end - start_pos > self . chunk_size {
340+ let chunk = & chunks[ i] ;
340341 self . add_output ( RangeValue :: new ( start_pos, chunk. end ) , output) ;
341342
342343 // Find the new start position, allowing overlap within the threshold.
343344 let mut new_start_idx = i + 1 ;
344- let next_chunk = & chunks[ i + 1 ] ;
345345 while new_start_idx > 0 {
346346 let prev_pos = chunks[ new_start_idx - 1 ] . start ;
347347 if prev_pos <= start_pos
You can’t perform that action at this time.
0 commit comments