Skip to content

Commit 2fb56cc

Browse files
committed
Update test to collect item with a different type than the original vec
1 parent c6c8f3b commit 2fb56cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/tests/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ fn test_from_iter_specialization_with_iterator_adapters() {
931931
.map_while(Option::Some)
932932
.peekable()
933933
.skip(1)
934-
.map(|e| if e != 0 { Ok(e) } else { Err(()) });
934+
.map(|e| if e != usize::MAX { Ok(std::num::NonZeroUsize::new(e)) } else { Err(()) });
935935
assert_in_place_trait(&iter);
936936
let sink = iter.collect::<Result<Vec<_>, _>>().unwrap();
937937
let sinkptr = sink.as_ptr();

0 commit comments

Comments
 (0)