]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #99434 - timvermeulen:skip_next_non_fused, r=scottmcm
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Tue, 19 Jul 2022 06:08:58 +0000 (11:38 +0530)
committerGitHub <noreply@github.com>
Tue, 19 Jul 2022 06:08:58 +0000 (11:38 +0530)
commite301cd39ad62cda469034539d06819a30ee12305
treeb66f6f06ac58e278cd8ace1dadd7ce5682dec2ca
parent415f7e1c81a88dac99d1073526d56fc02e4395e4
parente52837c362d00fb7672dacb30de58dd114d2811e
Rollup merge of #99434 - timvermeulen:skip_next_non_fused, r=scottmcm

Fix `Skip::next` for non-fused inner iterators

`iter.skip(n).next()` will currently call `nth` and `next` in succession on `iter`, without checking whether `nth` exhausts the iterator. Using `?` to propagate a `None` value returned by `nth` avoids this.