Update test to collect item with a different type than the original vec

This commit is contained in:
Giacomo Stevanato
2021-02-03 21:00:07 +01:00
parent c6c8f3bf12
commit 2fb56cc123
+1 -1
View File
@@ -931,7 +931,7 @@ fn assert_in_place_trait<T: InPlaceIterable>(_: &T) {}
.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();