diff options
| author | Patrick Walton <[email protected]> | 2011-03-18 15:18:45 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-18 15:18:45 -0700 |
| commit | 47d650e25bbc9c6ce4a062142f9682b8010bb4da (patch) | |
| tree | ae7381938f0f4da05ec27bbd6adb386670a8774b /src/lib/map.rs | |
| parent | rustc: Get type params from the item when translating native items (diff) | |
| download | rust-47d650e25bbc9c6ce4a062142f9682b8010bb4da.tar.xz rust-47d650e25bbc9c6ce4a062142f9682b8010bb4da.zip | |
rustc: Box the tuples returned by hashmap.items() for now since we don't have alias iterators yet
Diffstat (limited to 'src/lib/map.rs')
| -rw-r--r-- | src/lib/map.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/map.rs b/src/lib/map.rs index 61d5ccf6..f22faaca 100644 --- a/src/lib/map.rs +++ b/src/lib/map.rs @@ -14,7 +14,7 @@ abs state type hashmap[K, V] = state obj { fn find(&K key) -> option.t[V]; fn remove(&K key) -> option.t[V]; fn rehash(); - iter items() -> tup(K,V); + iter items() -> @tup(K,V); }; fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] { @@ -216,11 +216,11 @@ fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] { bkts = newbkts; } - iter items() -> tup(K,V) { + iter items() -> @tup(K,V) { for (bucket[K,V] b in bkts) { alt (b) { case(some[K,V](?k,?v)) { - put tup(k,v); + put @tup(k,v); } case (_) { } } |