delete some dead code, squash wanings

This commit is contained in:
Niko Matsakis 2022-08-12 00:08:11 -04:00
parent aa88884b51
commit af9de5686d
4 changed files with 2 additions and 21 deletions

View file

@ -42,18 +42,6 @@ impl<K: AsId, V> MemoMap<K, V> {
pub(super) fn get(&self, key: K) -> Option<Guard<Arc<Memo<V>>>> {
self.map.get(&key).map(|v| v.load())
}
/// Iterates over the entries in the map. This holds a read lock while iteration continues.
pub(super) fn iter(&self) -> impl Iterator<Item = (K, Arc<Memo<V>>)> + '_ {
self.map
.iter()
.map(move |r| (*r.key(), r.value().load_full()))
}
/// Clears the memo of all entries.
pub(super) fn clear(&self) {
self.map.clear()
}
}
#[derive(Debug)]

View file

@ -38,7 +38,7 @@ impl<Db> crate::debug::DebugWithDb<Db> for DependencyIndex
where
Db: ?Sized + Database,
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>, db: &Db) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>, _db: &Db) -> std::fmt::Result {
write!(f, "{:?}", *self) // FIXME
}
}

View file

@ -60,11 +60,4 @@ impl AtomicRevision {
pub(crate) fn store(&self, r: Revision) {
self.data.store(r.as_usize(), Ordering::SeqCst);
}
/// Increment by 1, returning previous value.
pub(crate) fn fetch_then_increment(&self) -> Revision {
let v = self.data.fetch_add(1, Ordering::SeqCst);
assert!(v != usize::max_value(), "revision overflow");
Revision::from(v)
}
}

View file

@ -2,7 +2,7 @@ use std::collections::BTreeSet;
use crate::{
durability::Durability,
hash::{FxHashSet, FxIndexMap, FxIndexSet},
hash::{FxIndexMap, FxIndexSet},
key::{DatabaseKeyIndex, DependencyIndex},
tracked_struct::Disambiguator,
Cycle, Revision, Runtime,