diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-07-27 14:52:15 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-07-27 15:49:03 -0700 |
| commit | dd106ba7631e07445f374339dcb8a3bbf0fa8e18 (patch) | |
| tree | 5db7f049cc206b6659172da81b72d501b3c9c68c /src/libstd/send_map.rs | |
| parent | 638491712e265c8d5bc9bd9852ece17b5ec78f5b (diff) | |
| download | rust-dd106ba7631e07445f374339dcb8a3bbf0fa8e18.tar.gz rust-dd106ba7631e07445f374339dcb8a3bbf0fa8e18.zip | |
export send_map and use fewer impl names
Diffstat (limited to 'src/libstd/send_map.rs')
| -rw-r--r-- | src/libstd/send_map.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/send_map.rs b/src/libstd/send_map.rs index 90d99adad89..e514d68e670 100644 --- a/src/libstd/send_map.rs +++ b/src/libstd/send_map.rs @@ -15,7 +15,7 @@ type eqfn<K> = pure fn~(K, K) -> bool; /// Open addressing with linear probing. mod linear { - export linear_map, linear_map_with_capacity; + export linear_map, linear_map_with_capacity, public_methods; const initial_capacity: uint = 32u; // 2^5 type bucket<K,V> = {hash: uint, key: K, value: V}; @@ -64,7 +64,7 @@ mod linear { p as &K } - impl private_const_methods<K,V> for &const linear_map<K,V> { + impl private_methods<K,V> for &const linear_map<K,V> { #[inline(always)] pure fn to_bucket(h: uint) -> uint { // FIXME(#3041) borrow a more sophisticated technique here from @@ -130,7 +130,7 @@ mod linear { } } - impl private_mut_methods<K,V> for &mut linear_map<K,V> { + impl private_methods<K,V> for &mut linear_map<K,V> { /// Expands the capacity of the array and re-inserts each /// of the existing buckets. fn expand() { @@ -179,7 +179,7 @@ mod linear { } } - impl mut_methods<K,V> for &mut linear_map<K,V> { + impl public_methods<K,V> for &mut linear_map<K,V> { fn insert(+k: K, +v: V) -> bool { if self.size >= self.resize_at { // n.b.: We could also do this after searching, so @@ -233,13 +233,13 @@ mod linear { } } - impl private_imm_methods<K,V> for &linear_map<K,V> { + impl private_methods<K,V> for &linear_map<K,V> { fn search(hash: uint, op: fn(x: &option<bucket<K,V>>) -> bool) { let _ = self.bucket_sequence(hash, |i| op(&self.buckets[i])); } } - impl const_methods<K,V> for &const linear_map<K,V> { + impl public_methods<K,V> for &const linear_map<K,V> { fn size() -> uint { self.size } @@ -252,7 +252,7 @@ mod linear { } } - impl const_methods<K,V: copy> for &const linear_map<K,V> { + impl public_methods<K,V: copy> for &const linear_map<K,V> { fn find(k: &K) -> option<V> { alt self.bucket_for_key(self.buckets, k) { found_entry(idx) => { |
