diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/vec.rs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 8340b956b65..54efd35b91e 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -1667,44 +1667,6 @@ pub fn eachi_reverse<'r,T>(v: &'r [T], } /** - * Iterates over two vectors simultaneously - * - * # Failure - * - * Both vectors must have the same length - */ -#[inline] -pub fn each2<U, T>(v1: &[U], v2: &[T], f: &fn(u: &U, t: &T) -> bool) -> bool { - assert_eq!(v1.len(), v2.len()); - for uint::range(0u, v1.len()) |i| { - if !f(&v1[i], &v2[i]) { - return false; - } - } - return true; -} - -/** - * - * Iterates over two vector with mutable. - * - * # Failure - * - * Both vectors must have the same length - */ -#[inline] -pub fn each2_mut<U, T>(v1: &mut [U], v2: &mut [T], - f: &fn(u: &mut U, t: &mut T) -> bool) -> bool { - assert_eq!(v1.len(), v2.len()); - for uint::range(0u, v1.len()) |i| { - if !f(&mut v1[i], &mut v2[i]) { - return false; - } - } - return true; -} - -/** * Iterate over all permutations of vector `v`. * * Permutations are produced in lexicographic order with respect to the order |
