extract StampedValue into the runtime module

This commit is contained in:
Niko Matsakis 2018-10-01 05:37:35 -04:00
parent 5172b4a7d3
commit b5d1ba9000
3 changed files with 8 additions and 11 deletions

View file

@ -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,
}

View file

@ -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>,

View file

@ -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,
}