Skip to content

Commit 5f78b4e

Browse files
committed
array_chunks: remove Option wrapper from into_remainder's return type
1 parent 4146079 commit 5f78b4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/iter/adapters/array_chunks.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ where
4646
/// ```
4747
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
4848
#[inline]
49-
pub fn into_remainder(mut self) -> Option<array::IntoIter<I::Item, N>> {
50-
if self.remainder.is_none() {
51-
while let Some(_) = self.next() {}
49+
pub fn into_remainder(mut self) -> array::IntoIter<I::Item, N> {
50+
while self.remainder.is_none() {
51+
let _ = self.next();
5252
}
53-
self.remainder
53+
self.remainder.unwrap()
5454
}
5555
}
5656

0 commit comments

Comments
 (0)