mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-23 05:07:27 +00:00
extract StampedValue into the runtime module
This commit is contained in:
parent
5172b4a7d3
commit
b5d1ba9000
3 changed files with 8 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
use crate::runtime::QueryDescriptorSet;
|
||||
use crate::runtime::Revision;
|
||||
use crate::runtime::StampedValue;
|
||||
use crate::CycleDetected;
|
||||
use crate::MutQueryStorageOps;
|
||||
use crate::Query;
|
||||
|
@ -137,9 +138,3 @@ where
|
|||
map_write.insert(key, StampedValue { value, changed_at });
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct StampedValue<V> {
|
||||
value: V,
|
||||
changed_at: Revision,
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use crate::runtime::QueryDescriptorSet;
|
||||
use crate::runtime::Revision;
|
||||
use crate::runtime::StampedValue;
|
||||
use crate::CycleDetected;
|
||||
use crate::Query;
|
||||
use crate::QueryContext;
|
||||
|
@ -75,11 +76,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
struct StampedValue<V> {
|
||||
value: V,
|
||||
changed_at: Revision,
|
||||
}
|
||||
|
||||
impl<QC, Q> Default for MemoizedStorage<QC, Q>
|
||||
where
|
||||
Q: Query<QC>,
|
||||
|
|
|
@ -235,3 +235,9 @@ impl<QC: QueryContext> QueryDescriptorSet<QC> {
|
|||
self.set.iter()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
crate struct StampedValue<V> {
|
||||
crate value: V,
|
||||
crate changed_at: Revision,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue