diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 22:37:22 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 23:17:34 -0800 |
| commit | 04a2887f8791bb080b4e76a55949a7c1954dbb97 (patch) | |
| tree | f072b2cc1e0b41270041a3a10a4fc313d3fa1a89 /src/libstd/map.rs | |
| parent | ca7cfbe3d0251766217e5d4e559903e655e7549b (diff) | |
| download | rust-04a2887f8791bb080b4e76a55949a7c1954dbb97.tar.gz rust-04a2887f8791bb080b4e76a55949a7c1954dbb97.zip | |
Remove '.' after nullary tags in patterns
Does what it says on the tin. The next commit will remove support for this syntax.
Diffstat (limited to 'src/libstd/map.rs')
| -rw-r--r-- | src/libstd/map.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs index f9cc5c66572..9496f2febed 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -137,7 +137,7 @@ mod chained { let comp = 1u; // for logging while true { alt e0.next { - absent. { + absent { #debug("search_tbl: absent, comp %u, hash %u, idx %u", comp, h, idx); ret not_found; @@ -162,7 +162,7 @@ mod chained { tbl: t<K,V>, k: K, h: uint) -> search_result<K,V> { let idx = h % vec::len(tbl.chains); alt tbl.chains[idx] { - absent. { + absent { #debug("search_tbl: absent, comp %u, hash %u, idx %u", 0u, h, idx); ret not_found; @@ -183,7 +183,7 @@ mod chained { fn insert<K: copy, V: copy>(tbl: t<K,V>, k: K, v: V) -> bool { let hash = tbl.hasher(k); alt search_tbl(tbl, k, hash) { - not_found. { + not_found { tbl.size += 1u; let idx = hash % vec::len(tbl.chains); let old_chain = tbl.chains[idx]; @@ -207,7 +207,7 @@ mod chained { fn get<K: copy, V: copy>(tbl: t<K,V>, k: K) -> core::option::t<V> { alt search_tbl(tbl, k, tbl.hasher(k)) { - not_found. { + not_found { ret core::option::none; } @@ -223,7 +223,7 @@ mod chained { fn remove<K: copy, V: copy>(tbl: t<K,V>, k: K) -> core::option::t<V> { alt search_tbl(tbl, k, tbl.hasher(k)) { - not_found. { + not_found { ret core::option::none; } @@ -250,7 +250,7 @@ mod chained { let chain = chain0; while true { alt chain { - absent. { ret; } + absent { ret; } present(entry) { let next = entry.next; blk(entry); // may modify entry.next! @@ -569,7 +569,7 @@ mod tests { let v = hm.remove(i); alt v { option::some(u) { assert (u == i * i); } - option::none. { fail; } + option::none { fail; } } i += 2u; } |
