bors 5fd3a5c7c1 Auto merge of #89916 - the8472:advance_by-avoid-err-0, r=dtolnay
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-27 11:31:26 +00:00
..
2021-10-18 19:19:28 +09:00
2021-10-18 19:19:28 +09:00
2021-10-18 19:19:28 +09:00
2021-10-18 19:19:28 +09:00
2021-11-22 13:09:08 -05:00
2021-10-18 19:19:28 +09:00
2021-10-17 18:39:54 +09:00
2021-11-14 12:26:35 -05:00