Skip to content

Commit 57a402d

Browse files
committed
make ActiveQuery::iteration_count private with accessor
1 parent 072ada7 commit 57a402d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/active_query.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub(crate) struct ActiveQuery {
6262
cycle_heads: CycleHeads,
6363

6464
/// If this query is a cycle head, iteration count of that cycle.
65-
pub(crate) iteration_count: u32,
65+
iteration_count: u32,
6666
}
6767

6868
impl ActiveQuery {
@@ -129,6 +129,10 @@ impl ActiveQuery {
129129
changed_at: self.changed_at,
130130
}
131131
}
132+
133+
pub(super) fn iteration_count(&self) -> u32 {
134+
self.iteration_count
135+
}
132136
}
133137

134138
impl ActiveQuery {

src/function/maybe_changed_after.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ where
280280
if !db.zalsa_local().with_query_stack(|stack| {
281281
stack.iter().any(|entry| {
282282
entry.database_key_index == cycle_head.database_key_index
283-
&& entry.iteration_count == cycle_head.iteration_count
283+
&& entry.iteration_count() == cycle_head.iteration_count
284284
})
285285
}) {
286286
return false;

0 commit comments

Comments
 (0)