mirror of
https://github.com/salsa-rs/salsa.git
synced 2024-10-23 12:49:57 +00:00
separate marking the outputs as verified
There are 3 call-sites to this function: * One of them has already marked the outputs * One of them has no outputs * The third does need to mark the outputs
This commit is contained in:
parent
e24ace24eb
commit
a32078153b
2 changed files with 9 additions and 2 deletions
|
@ -127,7 +127,9 @@ where
|
|||
|
||||
if memo.check_durability(runtime) {
|
||||
// No input of the suitable durability has changed since last verified.
|
||||
memo.mark_as_verified(db.as_salsa_database(), runtime, database_key_index);
|
||||
let db = db.as_salsa_database();
|
||||
memo.mark_as_verified(db, runtime, database_key_index);
|
||||
memo.mark_outputs_as_verified(db, database_key_index);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,8 +126,13 @@ impl<V> Memo<V> {
|
|||
});
|
||||
|
||||
self.verified_at.store(runtime.current_revision());
|
||||
}
|
||||
|
||||
// Also mark the outputs as verified
|
||||
pub(super) fn mark_outputs_as_verified(
|
||||
&self,
|
||||
db: &dyn crate::Database,
|
||||
database_key_index: DatabaseKeyIndex,
|
||||
) {
|
||||
for output in self.revisions.origin.outputs() {
|
||||
db.mark_validated_output(database_key_index, output);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue