about summary refs log tree commit diff
path: root/src/test/stdtest
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2011-08-12 11:47:44 -0700
committerMichael Sullivan <sully@msully.net>2011-08-12 11:47:44 -0700
commit8a9766000ec60f2d381a8bc64cde1b7e9abc7c6b (patch)
treec2cdcbda37d24324e5afd13ede1dcde44bb017c9 /src/test/stdtest
parentde4b383a0f6959ce4376274c5cae1b94bb76947c (diff)
downloadrust-8a9766000ec60f2d381a8bc64cde1b7e9abc7c6b.tar.gz
rust-8a9766000ec60f2d381a8bc64cde1b7e9abc7c6b.zip
Change a bunch of places in the stdlib to use blocks.
Diffstat (limited to 'src/test/stdtest')
-rw-r--r--src/test/stdtest/vec.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/stdtest/vec.rs b/src/test/stdtest/vec.rs
index af346472f82..ab7ebd5a9e0 100644
--- a/src/test/stdtest/vec.rs
+++ b/src/test/stdtest/vec.rs
@@ -39,9 +39,8 @@ fn test_slice() {
 #[test]
 fn test_map() {
     fn square(x: &int) -> int { ret x * x; }
-    let op: option::operator[int, int] = square;
     let v: vec[int] = [1, 2, 3, 4, 5];
-    let s: vec[int] = map[int, int](op, v);
+    let s: vec[int] = map(square, v);
     let i: int = 0;
     while i < 5 { assert (v.(i) * v.(i) == s.(i)); i += 1; }
 }
@@ -92,4 +91,4 @@ fn test_position_pred() {
     let v1: vec[int] = [5, 4, 3, 2, 1];
     assert (position_pred(less_than_three, v1) == option::some[uint](3u));
     assert (position_pred(is_eighteen, v1) == option::none[uint]);
-}
\ No newline at end of file
+}