From 04a2887f8791bb080b4e76a55949a7c1954dbb97 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 18 Jan 2012 22:37:22 -0800 Subject: Remove '.' after nullary tags in patterns Does what it says on the tin. The next commit will remove support for this syntax. --- src/libstd/map.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libstd/map.rs') 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: K, h: uint) -> search_result { 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(tbl: t, 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(tbl: t, k: K) -> core::option::t { alt search_tbl(tbl, k, tbl.hasher(k)) { - not_found. { + not_found { ret core::option::none; } @@ -223,7 +223,7 @@ mod chained { fn remove(tbl: t, k: K) -> core::option::t { 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; } -- cgit 1.4.1-3-g733a5