about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/map.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index bce843224d1..90ca5e23372 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -237,7 +237,10 @@ mod chained {
         }
 
         fn get(k: K) -> V {
-            self.find(k).expect(~"Key not found in table")
+            alt self.find(k) {
+              some(v) => {v}
+              none => {fail #fmt["Key not found in table: %?", k]}
+            }
         }
 
         fn [](k: K) -> V {