Unusual conflict, no apparent commits from another machine. Resolved formatting. Using HEAD.

This commit is contained in:
Christian Lincoln 2026-09-28 21:35:58 +01:00
commit d45e9bd270

View file

@ -263,27 +263,6 @@ impl<E: TableEntry> DisplacementSet<E> {
} }
} }
} }
pub fn get<K>(&mut self, index: K) -> Option<&E>
where
E: Equivalent<K>,
K: Hashes,
{
if self.map.len() == 0 {
return None;
}
let location = index.hashed() as usize % self.map.len();
let home = &self.map[location];
if home.entry.matches(&index) {
Some(&home.entry)
} else {
for i in 1..home.displacement as usize {
let neighbour = &self.map[(location + i) % self.map.len()];
if neighbour.entry.matches(&index) {
return Some(&neighbour.entry);
}
}
None
}
} }
pub fn new() -> DisplacementSet<E> { pub fn new() -> DisplacementSet<E> {
DisplacementSet { DisplacementSet {
@ -292,7 +271,6 @@ impl<E: TableEntry> DisplacementSet<E> {
map_bounds: (0..0).into(), map_bounds: (0..0).into(),
} }
} }
}
#[derive(Clone)] #[derive(Clone)]
pub struct MapEntry<K: Hashes + PartialEq, V>(pub Option<(K, V)>); pub struct MapEntry<K: Hashes + PartialEq, V>(pub Option<(K, V)>);