about summary refs log tree commit diff
path: root/src/libcore/result.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-08-08 12:58:22 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-08-09 18:26:50 -0700
commit1b2d91c79da93461563428d25ae09bbeb59ed292 (patch)
tree3a9bd4db41536f3cc05107d448a11fc4dd7355cf /src/libcore/result.rs
parentfe8c8ad5827e0156490d78257b5e33cf9bc1281a (diff)
de-mode-ify infer and some parts of typeck
also, fix bug in the various lint passes that fn() was considered
not suitable for the default mode
Diffstat (limited to 'src/libcore/result.rs')
-rw-r--r--src/libcore/result.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index 42a4b671a39..762191842b8 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -250,7 +250,7 @@ impl<T: copy, E: copy> result<T, E> {
  *     }
  */
 fn map_vec<T,U:copy,V:copy>(
-    ts: ~[T], op: fn(T) -> result<V,U>) -> result<~[V],U> {
+    ts: &[T], op: fn(T) -> result<V,U>) -> result<~[V],U> {
 
     let mut vs: ~[V] = ~[];
     vec::reserve(vs, vec::len(ts));
@@ -284,7 +284,7 @@ fn map_opt<T,U:copy,V:copy>(
  * used in 'careful' code contexts where it is both appropriate and easy
  * to accommodate an error like the vectors being of different lengths.
  */
-fn map_vec2<S,T,U:copy,V:copy>(ss: ~[S], ts: ~[T],
+fn map_vec2<S,T,U:copy,V:copy>(ss: &[S], ts: &[T],
                                op: fn(S,T) -> result<V,U>) -> result<~[V],U> {
 
     assert vec::same_length(ss, ts);
@@ -307,7 +307,7 @@ fn map_vec2<S,T,U:copy,V:copy>(ss: ~[S], ts: ~[T],
  * error.  This could be implemented using `map2()` but it is more efficient
  * on its own as no result vector is built.
  */
-fn iter_vec2<S,T,U:copy>(ss: ~[S], ts: ~[T],
+fn iter_vec2<S,T,U:copy>(ss: &[S], ts: &[T],
                          op: fn(S,T) -> result<(),U>) -> result<(),U> {
 
     assert vec::same_length(ss, ts);