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:
Niko Matsakis 2018-10-01 13:20:18 -04:00
parent 848019bbca
commit 5472cfdbc8

View file

@ -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