Skip to content

Commit dd106ba

Browse files
committed
export send_map and use fewer impl names
1 parent 6384917 commit dd106ba

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/libstd/send_map.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type eqfn<K> = pure fn~(K, K) -> bool;
1515

1616
/// Open addressing with linear probing.
1717
mod linear {
18-
export linear_map, linear_map_with_capacity;
18+
export linear_map, linear_map_with_capacity, public_methods;
1919

2020
const initial_capacity: uint = 32u; // 2^5
2121
type bucket<K,V> = {hash: uint, key: K, value: V};
@@ -64,7 +64,7 @@ mod linear {
6464
p as &K
6565
}
6666

67-
impl private_const_methods<K,V> for &const linear_map<K,V> {
67+
impl private_methods<K,V> for &const linear_map<K,V> {
6868
#[inline(always)]
6969
pure fn to_bucket(h: uint) -> uint {
7070
// FIXME(#3041) borrow a more sophisticated technique here from
@@ -130,7 +130,7 @@ mod linear {
130130
}
131131
}
132132

133-
impl private_mut_methods<K,V> for &mut linear_map<K,V> {
133+
impl private_methods<K,V> for &mut linear_map<K,V> {
134134
/// Expands the capacity of the array and re-inserts each
135135
/// of the existing buckets.
136136
fn expand() {
@@ -179,7 +179,7 @@ mod linear {
179179
}
180180
}
181181

182-
impl mut_methods<K,V> for &mut linear_map<K,V> {
182+
impl public_methods<K,V> for &mut linear_map<K,V> {
183183
fn insert(+k: K, +v: V) -> bool {
184184
if self.size >= self.resize_at {
185185
// n.b.: We could also do this after searching, so
@@ -233,13 +233,13 @@ mod linear {
233233
}
234234
}
235235

236-
impl private_imm_methods<K,V> for &linear_map<K,V> {
236+
impl private_methods<K,V> for &linear_map<K,V> {
237237
fn search(hash: uint, op: fn(x: &option<bucket<K,V>>) -> bool) {
238238
let _ = self.bucket_sequence(hash, |i| op(&self.buckets[i]));
239239
}
240240
}
241241

242-
impl const_methods<K,V> for &const linear_map<K,V> {
242+
impl public_methods<K,V> for &const linear_map<K,V> {
243243
fn size() -> uint {
244244
self.size
245245
}
@@ -252,7 +252,7 @@ mod linear {
252252
}
253253
}
254254

255-
impl const_methods<K,V: copy> for &const linear_map<K,V> {
255+
impl public_methods<K,V: copy> for &const linear_map<K,V> {
256256
fn find(k: &K) -> option<V> {
257257
alt self.bucket_for_key(self.buckets, k) {
258258
found_entry(idx) => {

src/libstd/std.rc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import core::*;
2323
export net, net_tcp, net_ip, net_url;
2424
export uv, uv_ll, uv_iotask, uv_global_loop;
2525
export c_vec, util, timer;
26-
export bitv, deque, fun_treemap, list, map, smallintmap, sort, treemap;
26+
export bitv, deque, fun_treemap, list, map, send_map;
27+
export smallintmap, sort, treemap;
2728
export rope, arena, par;
2829
export ebml, dbg, getopts, json, rand, sha1, term, time, prettyprint;
2930
export test, tempfile, serialization;

0 commit comments

Comments
 (0)