rust/library/core/tests/iter/adapters
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
..
chain.rs Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
cloned.rs
copied.rs
cycle.rs
enumerate.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
filter_map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
filter.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
flat_map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
flatten.rs Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
fuse.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
inspect.rs
intersperse.rs Fix core tests 2021-03-03 11:22:49 +01:00
map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
mod.rs Consistent spelling of "adapter" in the standard library 2021-07-30 17:23:07 +02:00
peekable.rs
scan.rs
skip_while.rs
skip.rs Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
step_by.rs
take_while.rs
take.rs Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
zip.rs disable test on platforms that don't support unwinding 2021-06-20 12:20:05 +02:00