Skip to content

Commit

Permalink
More sed fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Jan 26, 2015
1 parent 58ed3af commit 81b54b2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion phf/src/map.rs
Expand Up @@ -83,7 +83,7 @@ impl<K, V> Map<K, V> {
self.get_entry(key).map(|e| e.1)
}

/// Returns a reference to the map's isizeernal static instance of the given
/// Returns a reference to the map's internal static instance of the given
/// key.
///
/// This can be useful for interning schemes.
Expand Down
8 changes: 4 additions & 4 deletions phf/src/ordered_map.rs
Expand Up @@ -85,7 +85,7 @@ impl<K, V> OrderedMap<K, V> {
self.get_entry(key).map(|e| e.1)
}

/// Returns a reference to the map's isizeernal static instance of the given
/// Returns a reference to the map's internal static instance of the given
/// key.
///
/// This can be useful for interning schemes.
Expand All @@ -102,16 +102,16 @@ impl<K, V> OrderedMap<K, V> {
/// the ordered map.
pub fn get_index<T: ?Sized>(&self, key: &T) -> Option<usize>
where T: Eq + PhfHash + BorrowFrom<K> {
self.get_isizeernal(key).map(|(i, _)| i)
self.get_internal(key).map(|(i, _)| i)
}

/// Like `get`, but returns both the key and the value.
pub fn get_entry<T: ?Sized>(&self, key: &T) -> Option<(&K, &V)>
where T: Eq + PhfHash + BorrowFrom<K> {
self.get_isizeernal(key).map(|(_, e)| e)
self.get_internal(key).map(|(_, e)| e)
}

fn get_isizeernal<T: ?Sized>(&self, key: &T) -> Option<(usize, (&K, &V))>
fn get_internal<T: ?Sized>(&self, key: &T) -> Option<(usize, (&K, &V))>
where T: Eq + PhfHash + BorrowFrom<K> {
let (g, f1, f2) = key.phf_hash(self.key);
let (d1, d2) = self.disps[(g % (self.disps.len() as u32)) as usize];
Expand Down
2 changes: 1 addition & 1 deletion phf/src/ordered_set.rs
Expand Up @@ -63,7 +63,7 @@ impl<T> OrderedSet<T> {
self.len() == 0
}

/// Returns a reference to the set's isizeernal static instance of the given
/// Returns a reference to the set's internal static instance of the given
/// key.
///
/// This can be useful for interning schemes.
Expand Down
2 changes: 1 addition & 1 deletion phf/src/set.rs
Expand Up @@ -61,7 +61,7 @@ impl<T> Set<T> {
self.len() == 0
}

/// Returns a reference to the set's isizeernal static instance of the given
/// Returns a reference to the set's internal static instance of the given
/// key.
///
/// This can be useful for interning schemes.
Expand Down

0 comments on commit 81b54b2

Please sign in to comment.