make accumulate take database instead of Runtime

We are going to want to take databases at
public entry points.
This commit is contained in:
Niko Matsakis 2024-07-23 05:50:59 -04:00
parent 3d2b2d3a65
commit f466228da5
2 changed files with 4 additions and 2 deletions

View file

@ -35,7 +35,8 @@ macro_rules! setup_accumulator_impl {
where
Db: ?Sized + $zalsa::Database,
{
$ingredient(db.as_salsa_database()).push(db.runtime(), self);
let db = db.as_salsa_database();
$ingredient(db).push(db, self);
}
}
};

View file

@ -78,7 +78,8 @@ impl<A: Accumulator> IngredientImpl<A> {
}
}
pub fn push(&self, runtime: &Runtime, value: A) {
pub fn push(&self, db: &dyn crate::Database, value: A) {
let runtime = db.runtime();
let current_revision = runtime.current_revision();
let (active_query, _) = match runtime.active_query() {
Some(pair) => pair,