From 2fb56cc123cc1111cff2803ab7df26a0f0941fae Mon Sep 17 00:00:00 2001 From: Giacomo Stevanato Date: Wed, 3 Feb 2021 21:00:07 +0100 Subject: [PATCH] Update test to collect item with a different type than the original vec --- library/alloc/tests/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 9ae333ce2c3..9a0739a2759 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -931,7 +931,7 @@ fn test_from_iter_specialization_with_iterator_adapters() { .map_while(Option::Some) .peekable() .skip(1) - .map(|e| if e != 0 { Ok(e) } else { Err(()) }); + .map(|e| if e != usize::MAX { Ok(std::num::NonZeroUsize::new(e)) } else { Err(()) }); assert_in_place_trait(&iter); let sink = iter.collect::, _>>().unwrap(); let sinkptr = sink.as_ptr();