diff --git a/src/map.rs b/src/map.rs index d5fe69d..8fb5bfc 100644 --- a/src/map.rs +++ b/src/map.rs @@ -263,34 +263,12 @@ impl DisplacementSet { } } } - pub fn get(&mut self, index: K) -> Option<&E> - where - E: Equivalent, - 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 { - DisplacementSet { - map: Vec::new(), - map_count: 0, - map_bounds: (0..0).into(), - } +} +pub fn new() -> DisplacementSet { + DisplacementSet { + map: Vec::new(), + map_count: 0, + map_bounds: (0..0).into(), } }