diff options
| author | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-08-25 03:56:35 +0200 |
|---|---|---|
| committer | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-08-25 19:07:24 +0200 |
| commit | 35eb3e8b79c60ec18e724c7a68625d7cdf9300c0 (patch) | |
| tree | cbe9683058388284c4b11e0579c719eef98827b1 /src/rustllvm/RustWrapper.cpp | |
| parent | 4c996499a1bcf747b12f8290eeff3024e59da529 (diff) | |
| download | rust-35eb3e8b79c60ec18e724c7a68625d7cdf9300c0.tar.gz rust-35eb3e8b79c60ec18e724c7a68625d7cdf9300c0.zip | |
Correct iterator adaptor Chain
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
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
