diff options
| author | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2021-02-03 21:00:07 +0100 |
|---|---|---|
| committer | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2021-02-03 21:00:07 +0100 |
| commit | 2fb56cc123cc1111cff2803ab7df26a0f0941fae (patch) | |
| tree | 343f41d36d1d40a3bd4fa6fdca4b85bb31a0e32d | |
| parent | c6c8f3bf12bdeba01ba16eaacc5808e5321302f8 (diff) | |
| download | rust-2fb56cc123cc1111cff2803ab7df26a0f0941fae.tar.gz rust-2fb56cc123cc1111cff2803ab7df26a0f0941fae.zip | |
Update test to collect item with a different type than the original vec
| -rw-r--r-- | library/alloc/tests/vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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::<Result<Vec<_>, _>>().unwrap(); let sinkptr = sink.as_ptr(); |
