mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-02 09:46:06 +00:00
make accumulate take database instead of Runtime
We are going to want to take databases at public entry points.
This commit is contained in:
parent
3d2b2d3a65
commit
f466228da5
2 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue