File tree 1 file changed +13
-10
lines changed
1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -293,18 +293,21 @@ where
293
293
"{database_key_index:?}: validate_same_iteration(memo = {memo:#?})" ,
294
294
memo = memo. tracing_debug( )
295
295
) ;
296
- for cycle_head in & memo. revisions . cycle_heads {
297
- if !db. zalsa_local ( ) . with_query_stack ( |stack| {
298
- stack. iter ( ) . rev ( ) . any ( |entry| {
299
- entry. database_key_index == cycle_head. database_key_index
300
- && entry. iteration_count ( ) == cycle_head. iteration_count
301
- } )
302
- } ) {
303
- return false ;
304
- }
296
+
297
+ if memo. revisions . cycle_heads . is_empty ( ) {
298
+ return true ;
305
299
}
306
300
307
- true
301
+ let cycle_heads = & memo. revisions . cycle_heads ;
302
+
303
+ db. zalsa_local ( ) . with_query_stack ( |stack| {
304
+ cycle_heads. iter ( ) . all ( |cycle_head| {
305
+ stack. iter ( ) . rev ( ) . any ( |query| {
306
+ query. database_key_index == cycle_head. database_key_index
307
+ && query. iteration_count ( ) == cycle_head. iteration_count
308
+ } )
309
+ } )
310
+ } )
308
311
}
309
312
310
313
/// VerifyResult::Unchanged if the memo's value and `changed_at` time is up-to-date in the
You can’t perform that action at this time.
0 commit comments