rust/library/core
Mara Bos 446ed77124
Rollup merge of #80567 - lukaslueg:intersperse_with, r=m-ou-se
Add Iterator::intersperse_with

This is a follow-up to #79479, tracking in #79524, as discussed https://github.com/rust-lang/rust/pull/79479#issuecomment-752671731.

~~Note that I had to manually implement `Clone` and `Debug` because `derive` insists on placing a `Clone`-bound on the struct-definition, which is too narrow. There is a long-standing issue # for this somewhere around here :-)~~

Also, note that I refactored the guts of `Intersperse` into private functions and re-used them in `IntersperseWith`, so I also went light on duplicating all the tests.

If this is suitable to be merged, the tracking issue should be updated, since it only mentions `intersperse`.

Happy New Year!

r? ``@m-ou-se``
2021-01-14 18:00:06 +00:00
..
benches Remove redundant 'static from library crates 2020-10-18 17:25:51 +02:00
src Rollup merge of #80567 - lukaslueg:intersperse_with, r=m-ou-se 2021-01-14 18:00:06 +00:00
tests Rollup merge of #80567 - lukaslueg:intersperse_with, r=m-ou-se 2021-01-14 18:00:06 +00:00
Cargo.toml mv std libs to library/ 2020-07-27 19:51:13 -05:00