Skip to content

Commit f0a0087

Browse files
committed
Revert "defer head_ids creation"
This reverts commit 23b4ba7.
1 parent 23b4ba7 commit f0a0087

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/cycle.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -471,23 +471,16 @@ impl Iterator for CycleHeadIdsIterator<'_> {
471471
/// The context that the cycle recovery function receives when a query cycle occurs.
472472
#[derive(Clone)]
473473
pub struct Cycle<'a> {
474-
/// The cycle heads.
475-
pub(crate) heads: &'a CycleHeads,
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>,
476478
/// The [`Id`] of the query that the current cycle recovery function is processing.
477479
pub id: Id,
478480
/// The counter of the current fixed point iteration.
479481
pub iteration: u32,
480482
}
481483

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-
491484
#[derive(Debug)]
492485
pub enum ProvisionalStatus<'db> {
493486
Provisional {

src/function/execute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ where
371371
};
372372

373373
let cycle = Cycle {
374-
heads: &cycle_heads,
374+
head_ids: cycle_heads.ids(),
375375
id,
376376
iteration: iteration_count.as_u32(),
377377
};

0 commit comments

Comments
 (0)