File tree Expand file tree Collapse file tree 1 file changed +16
-20
lines changed Expand file tree Collapse file tree 1 file changed +16
-20
lines changed Original file line number Diff line number Diff line change @@ -287,27 +287,23 @@ fn zip_nested_vectors<T: Clone>(vecs: Vec<Vec<T>>, result_size: usize) -> impl I
287
287
let mut total_hints_returned = 0 ;
288
288
289
289
core:: iter:: from_fn ( move || loop {
290
- let return_value = loop {
291
- if total_hints_returned == result_size || hint_index == max_vector_length {
292
- break None ;
293
- } ;
294
- let hint_value =
295
- if vecs[ vector_index] . len ( ) != 0 && vecs[ vector_index] . len ( ) > hint_index {
296
- Some ( vecs[ vector_index] [ hint_index] . clone ( ) )
297
- } else {
298
- None // no value retrieved - continue looping
299
- } ;
300
- vector_index += 1 ;
301
- if hint_index < max_vector_length && vector_index == number_inner_vectors {
302
- vector_index = 0 ;
303
- hint_index += 1 ;
304
- } ;
305
- if !hint_value. is_none ( ) {
306
- total_hints_returned += 1 ;
307
- break hint_value;
308
- } ;
290
+ if total_hints_returned == result_size || hint_index == max_vector_length {
291
+ return None ;
292
+ } ;
293
+ let hint_value = if vecs[ vector_index] . len ( ) != 0 && vecs[ vector_index] . len ( ) > hint_index {
294
+ Some ( vecs[ vector_index] [ hint_index] . clone ( ) )
295
+ } else {
296
+ None // no value retrieved - continue looping
297
+ } ;
298
+ vector_index += 1 ;
299
+ if hint_index < max_vector_length && vector_index == number_inner_vectors {
300
+ vector_index = 0 ;
301
+ hint_index += 1 ;
302
+ } ;
303
+ if !hint_value. is_none ( ) {
304
+ total_hints_returned += 1 ;
305
+ return hint_value;
309
306
} ;
310
- return return_value;
311
307
} )
312
308
}
313
309
You can’t perform that action at this time.
0 commit comments