rust/library/core/tests/iter
The8472 3f9b26dc64 Fix Iterator::advance_by contract inconsistency
The `advance_by(n)` docs state that in the error case `Err(k)` that k is always less than n.
It also states that `advance_by(0)` may return `Err(0)` to indicate an exhausted iterator.
These statements are inconsistent.
Since only one implementation (Skip) actually made use of that I changed it to return Ok(()) in that case too.

While adding some tests I also found a bug in `Take::advance_back_by`.
2021-11-19 13:00:23 +01:00
..
adapters Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
traits library/core/tests/iter documentation and cleanup 2021-01-22 17:57:08 -05:00
mod.rs library/core/tests/iter documentation and cleanup 2021-01-22 17:57:08 -05:00
range.rs Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
sources.rs library/core/test/iter add newlines between tests 2021-01-22 16:58:21 -05:00