35eb3e8b79
The iterator protocol specifies that the iteration ends with the return value `None` from `.next()` (or `.next_back()`) and it is unspecified what further calls return. The chain adaptor must account for this in its DoubleEndedIterator implementation. It uses three states: - Both `a` and `b` are valid - Only the Front iterator (`a`) is valid - Only the Back iterator (`b`) is valid The fourth state (neither iterator is valid) only occurs after Chain has returned None once, so we don't need to store this state. Fixes #26316 |
||
---|---|---|
.. | ||
fmt | ||
hash | ||
num | ||
any.rs | ||
atomic.rs | ||
cell.rs | ||
char.rs | ||
clone.rs | ||
cmp.rs | ||
intrinsics.rs | ||
iter.rs | ||
lib.rs | ||
mem.rs | ||
nonzero.rs | ||
ops.rs | ||
option.rs | ||
ptr.rs | ||
result.rs | ||
slice.rs | ||
str.rs | ||
tuple.rs |