diff --git a/phf/src/lib.rs b/phf/src/lib.rs index 4e38719a..0706875c 100644 --- a/phf/src/lib.rs +++ b/phf/src/lib.rs @@ -448,8 +448,8 @@ impl PhfOrderedMap where K: PhfHash+Eq { } impl PhfOrderedMap { - fn find_entry(&self, key: &T, check: |&K| -> bool) - -> Option<(uint, &(K, V))> where T: PhfHash { + fn find_entry(&self, key: &T, check: |&K| -> bool) -> Option<(uint, &(K, V))> + where T: PhfHash { let (g, f1, f2) = key.phf_hash(self.key); let (d1, d2) = self.disps[(g % (self.disps.len() as u32)) as uint]; let idx = self.idxs[(shared::displace(f1, f2, d1, d2) % (self.idxs.len() as u32)) as uint]; @@ -482,14 +482,13 @@ impl PhfOrderedMap { /// Like `find_index`, but can operate on any type that is equivalent to a /// key. - pub fn find_index_equiv(&self, key: &T) -> Option - where T: PhfHash+Equiv { + pub fn find_index_equiv(&self, key: &T) -> Option where T: PhfHash+Equiv { self.find_entry(key, |k| key.equiv(k)).map(|(i, _)| i) } /// Returns an iterator over the key/value pairs in the map. /// - /// Entries are retuned in the same order in which they were defined. + /// Entries are returned in the same order in which they were defined. pub fn entries<'a>(&'a self) -> PhfOrderedMapEntries<'a, K, V> { PhfOrderedMapEntries { iter: self.entries.iter() } }