Files
rust/library/core/src
bors 5849a7eca9 Auto merge of #77594 - timvermeulen:chain_advance_by, r=scottmcm
Implement advance_by, advance_back_by for iter::Chain

Part of #77404.

This PR does two things:
- implement `Chain::advance[_back]_by` in terms of `advance[_back]_by` on `self.a` and `advance[_back]_by` on `self.b`
- change `Chain::nth[_back]` to use `advance[_back]_by` on `self.a` and `nth[_back]` on `self.b`

This ensures that `Chain::nth` can take advantage of an efficient `nth` implementation on the second iterator, in case it doesn't implement `advance_by`.

cc `@scottmcm` in case you want to review this
2020-10-06 10:17:48 +00:00
..
…
2020-10-04 22:33:22 +02:00
…
…
…
2020-09-28 14:51:03 -04:00
2020-09-26 05:20:53 +00:00
…
2020-09-27 10:46:41 -07:00
…
…
…
…
…
…
…
…
2020-10-05 23:29:43 +08:00
…
…
…
…
…
…
…
…
…