diff --git a/src/free.rs b/src/free.rs index f698fd3db..9b535d357 100644 --- a/src/free.rs +++ b/src/free.rs @@ -105,7 +105,9 @@ pub fn rev(iterable: I) -> iter::Rev iterable.into_iter().rev() } -/// `zip()` returns a new array where each element is a tuple consisting +/// Returns an iterator pairing two arrays together in lock step. +/// +/// `zip()` returns an iterator where each element is a tuple consisting /// of elements from the _first_ and _second_ array. The returned array has as many elements /// as the shortest of the two arrays passed in. /// @@ -125,6 +127,7 @@ pub fn rev(iterable: I) -> iter::Rev /// } /// assert_eq!(result, vec![(1, 'a'),(2, 'b'),(3, 'c')]); /// ``` +#[deprecated(note="Use std::iter::zip instead", since="1.59.0")] pub fn zip(i: I, j: J) -> Zip where I: IntoIterator, J: IntoIterator