about summary refs log tree commit diff
path: root/src/libstd/map.rs
diff options
context:
space:
mode:
authorSimon BD <simon@server>2012-10-22 18:33:41 -0500
committerSimon BD <simon@server>2012-10-22 18:33:41 -0500
commitcc0f2c6bb26ba38d3487a396fa8625e938af6820 (patch)
tree6c2063df35144c5477b0adc9e49933d71224dc2a /src/libstd/map.rs
parent9aec7a3e85c5b07923eab05d3ebe9d031bf258f3 (diff)
parent9ee5fff4f16cfc3390bd69abbb46b0a68521667c (diff)
downloadrust-cc0f2c6bb26ba38d3487a396fa8625e938af6820.tar.gz
rust-cc0f2c6bb26ba38d3487a396fa8625e938af6820.zip
Merge remote-tracking branch 'original/incoming' into incoming
Diffstat (limited to 'src/libstd/map.rs')
-rw-r--r--src/libstd/map.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index 765d40339d3..e49f1abd02b 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -341,7 +341,8 @@ pub mod chained {
             wr.write_str(~" }");
         }
 
-        fn to_str() -> ~str {
+        pure fn to_str() -> ~str unsafe {
+            // Meh -- this should be safe
             do io::with_str_writer |wr| { self.to_writer(wr) }
         }
     }
@@ -722,7 +723,7 @@ mod tests {
         let map = map::HashMap::<~str, ~str>();
         assert (option::is_none(&map.find(key)));
         map.insert(key, ~"val");
-        assert (option::get(&map.find(key)) == ~"val");
+        assert (option::get(map.find(key)) == ~"val");
     }
 
     #[test]