File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -471,16 +471,23 @@ impl Iterator for CycleHeadIdsIterator<'_> {
471471/// The context that the cycle recovery function receives when a query cycle occurs.
472472#[ derive( Clone ) ]
473473pub struct Cycle < ' a > {
474- /// An iterator that outputs the [`Id`]s of the current cycle heads.
475- /// This will always contain the [`Id`] of the query being processed by the current cycle recovery function,
476- /// but its position will depend on the query execution order.
477- pub head_ids : CycleHeadIdsIterator < ' a > ,
474+ /// The cycle heads.
475+ pub ( crate ) heads : & ' a CycleHeads ,
478476 /// The [`Id`] of the query that the current cycle recovery function is processing.
479477 pub id : Id ,
480478 /// The counter of the current fixed point iteration.
481479 pub iteration : u32 ,
482480}
483481
482+ impl Cycle < ' _ > {
483+ /// An iterator that outputs the [`Id`]s of the current cycle heads.
484+ /// This will always contain the [`Id`] of the query being processed by the current cycle recovery function,
485+ /// but its position will depend on the query execution order.
486+ pub fn head_ids ( & self ) -> CycleHeadIdsIterator < ' _ > {
487+ self . heads . ids ( )
488+ }
489+ }
490+
484491#[ derive( Debug ) ]
485492pub enum ProvisionalStatus < ' db > {
486493 Provisional {
Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ where
371371 } ;
372372
373373 let cycle = Cycle {
374- head_ids : cycle_heads. ids ( ) ,
374+ heads : & cycle_heads,
375375 id,
376376 iteration : iteration_count. as_u32 ( ) ,
377377 } ;
You can’t perform that action at this time.
0 commit comments