diff --git a/src/iterators/exercise.rs b/src/iterators/exercise.rs index c3b4a41e8601..2d9786073349 100644 --- a/src/iterators/exercise.rs +++ b/src/iterators/exercise.rs @@ -27,7 +27,7 @@ where // ANCHOR_END: offset_differences let a = (&values).into_iter(); let b = (&values).into_iter().cycle().skip(offset); - a.zip(b).map(|(a, b)| *b - *a).take(values.len()).collect() + a.zip(b).map(|(a, b)| *b - *a).collect() } // ANCHOR: unit-tests