remove silly duration parameter

This commit is contained in:
Niko Matsakis 2021-10-30 10:26:29 -04:00
parent 293e103c09
commit 54277d4ad1
2 changed files with 5 additions and 12 deletions

View file

@ -231,10 +231,7 @@ impl Runtime {
});
// Push the active query onto the stack.
let max_durability = Durability::MAX;
let active_query = self
.local_state
.push_query(database_key_index, max_durability);
let active_query = self.local_state.push_query(database_key_index);
// Execute user's code, accumulating inputs etc.
let value = execute();
@ -526,10 +523,10 @@ pub(crate) struct ComputedQueryResult<V> {
}
impl ActiveQuery {
fn new(database_key_index: DatabaseKeyIndex, max_durability: Durability) -> Self {
fn new(database_key_index: DatabaseKeyIndex) -> Self {
ActiveQuery {
database_key_index,
durability: max_durability,
durability: Durability::MAX,
changed_at: Revision::start(),
dependencies: Some(FxIndexSet::default()),
cycle: None,

View file

@ -30,14 +30,10 @@ impl Default for LocalState {
}
impl LocalState {
pub(super) fn push_query(
&self,
database_key_index: DatabaseKeyIndex,
max_durability: Durability,
) -> ActiveQueryGuard<'_> {
pub(super) fn push_query(&self, database_key_index: DatabaseKeyIndex) -> ActiveQueryGuard<'_> {
let mut query_stack = self.query_stack.borrow_mut();
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 {
local_state: self,
push_len: query_stack.len(),