From dd106ba7631e07445f374339dcb8a3bbf0fa8e18 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 27 Jul 2012 14:52:15 -0700 Subject: [PATCH] export send_map and use fewer impl names --- src/libstd/send_map.rs | 14 +++++++------- src/libstd/std.rc | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/libstd/send_map.rs b/src/libstd/send_map.rs index 90d99adad896..e514d68e6709 100644 --- a/src/libstd/send_map.rs +++ b/src/libstd/send_map.rs @@ -15,7 +15,7 @@ type eqfn = 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 = {hash: uint, key: K, value: V}; @@ -64,7 +64,7 @@ mod linear { p as &K } - impl private_const_methods for &const linear_map { + impl private_methods for &const linear_map { #[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 for &mut linear_map { + impl private_methods for &mut linear_map { /// 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 for &mut linear_map { + impl public_methods for &mut linear_map { 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 for &linear_map { + impl private_methods for &linear_map { fn search(hash: uint, op: fn(x: &option>) -> bool) { let _ = self.bucket_sequence(hash, |i| op(&self.buckets[i])); } } - impl const_methods for &const linear_map { + impl public_methods for &const linear_map { fn size() -> uint { self.size } @@ -252,7 +252,7 @@ mod linear { } } - impl const_methods for &const linear_map { + impl public_methods for &const linear_map { fn find(k: &K) -> option { alt self.bucket_for_key(self.buckets, k) { found_entry(idx) => { diff --git a/src/libstd/std.rc b/src/libstd/std.rc index c1da4b0bd066..f1caf092ebb1 100644 --- a/src/libstd/std.rc +++ b/src/libstd/std.rc @@ -23,7 +23,8 @@ import core::*; export net, net_tcp, net_ip, net_url; export uv, uv_ll, uv_iotask, uv_global_loop; export c_vec, util, timer; -export bitv, deque, fun_treemap, list, map, smallintmap, sort, treemap; +export bitv, deque, fun_treemap, list, map, send_map; +export smallintmap, sort, treemap; export rope, arena, par; export ebml, dbg, getopts, json, rand, sha1, term, time, prettyprint; export test, tempfile, serialization;