From fd16202e36f1d4568550eb9022a43842b93fff6e Mon Sep 17 00:00:00 2001 From: The8472 Date: Wed, 27 Nov 2019 22:19:06 +0100 Subject: [PATCH] include in-place .zip() in test --- library/alloc/tests/vec.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 000797d3600..cbff7d37cdf 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -812,7 +812,14 @@ fn test_from_iter_specialization_with_iterator_adapters() { fn assert_in_place_trait(_: &T) {}; let src: Vec = vec![0usize; 65535]; let srcptr = src.as_ptr(); - let iter = src.into_iter().enumerate().map(|i| i.0 + i.1).peekable().skip(1); + let iter = src + .into_iter() + .enumerate() + .map(|i| i.0 + i.1) + .zip(std::iter::repeat(1usize)) + .map(|(a, b)| a + b) + .peekable() + .skip(1); assert_in_place_trait(&iter); let sink = iter.collect::>(); let sinkptr = sink.as_ptr();