mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-23 13:10:19 +00:00
remove silly duration parameter
This commit is contained in:
parent
293e103c09
commit
54277d4ad1
2 changed files with 5 additions and 12 deletions
|
@ -231,10 +231,7 @@ impl Runtime {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Push the active query onto the stack.
|
// Push the active query onto the stack.
|
||||||
let max_durability = Durability::MAX;
|
let active_query = self.local_state.push_query(database_key_index);
|
||||||
let active_query = self
|
|
||||||
.local_state
|
|
||||||
.push_query(database_key_index, max_durability);
|
|
||||||
|
|
||||||
// Execute user's code, accumulating inputs etc.
|
// Execute user's code, accumulating inputs etc.
|
||||||
let value = execute();
|
let value = execute();
|
||||||
|
@ -526,10 +523,10 @@ pub(crate) struct ComputedQueryResult<V> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActiveQuery {
|
impl ActiveQuery {
|
||||||
fn new(database_key_index: DatabaseKeyIndex, max_durability: Durability) -> Self {
|
fn new(database_key_index: DatabaseKeyIndex) -> Self {
|
||||||
ActiveQuery {
|
ActiveQuery {
|
||||||
database_key_index,
|
database_key_index,
|
||||||
durability: max_durability,
|
durability: Durability::MAX,
|
||||||
changed_at: Revision::start(),
|
changed_at: Revision::start(),
|
||||||
dependencies: Some(FxIndexSet::default()),
|
dependencies: Some(FxIndexSet::default()),
|
||||||
cycle: None,
|
cycle: None,
|
||||||
|
|
|
@ -30,14 +30,10 @@ impl Default for LocalState {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LocalState {
|
impl LocalState {
|
||||||
pub(super) fn push_query(
|
pub(super) fn push_query(&self, database_key_index: DatabaseKeyIndex) -> ActiveQueryGuard<'_> {
|
||||||
&self,
|
|
||||||
database_key_index: DatabaseKeyIndex,
|
|
||||||
max_durability: Durability,
|
|
||||||
) -> ActiveQueryGuard<'_> {
|
|
||||||
let mut query_stack = self.query_stack.borrow_mut();
|
let mut query_stack = self.query_stack.borrow_mut();
|
||||||
let query_stack = query_stack.as_mut().expect("local stack taken");
|
let query_stack = query_stack.as_mut().expect("local stack taken");
|
||||||
query_stack.push(ActiveQuery::new(database_key_index, max_durability));
|
query_stack.push(ActiveQuery::new(database_key_index));
|
||||||
ActiveQueryGuard {
|
ActiveQueryGuard {
|
||||||
local_state: self,
|
local_state: self,
|
||||||
push_len: query_stack.len(),
|
push_len: query_stack.len(),
|
||||||
|
|
Loading…
Reference in a new issue