mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-23 13:10:19 +00:00
simplify the logic by using changed_at
and not verified_at
I think they are actually equivalent, as we have already fond that the inputs did not change in the range `changed_at..=verified_at`.
This commit is contained in:
parent
848019bbca
commit
5472cfdbc8
1 changed files with 3 additions and 5 deletions
|
@ -128,11 +128,9 @@ where
|
|||
// first things first, let's walk over each of our previous
|
||||
// inputs and check whether they are out of date.
|
||||
if let Some(QueryState::Memoized(old_memo)) = &mut old_value {
|
||||
if old_memo
|
||||
.inputs
|
||||
.iter()
|
||||
.all(|old_input| !old_input.maybe_changed_since(query, old_memo.verified_at))
|
||||
{
|
||||
if old_memo.inputs.iter().all(|old_input| {
|
||||
!old_input.maybe_changed_since(query, old_memo.stamped_value.changed_at)
|
||||
}) {
|
||||
debug!("{:?}({:?}): inputs still valid", Q::default(), key);
|
||||
|
||||
// If none of out inputs have changed since the last time we refreshed
|
||||
|
|
Loading…
Reference in a new issue