syn icon indicating copy to clipboard operation
syn copied to clipboard

Extend<Pair<&..>> and Pairs::cloned supports for Punctuated

Open dhardy opened this issue 4 years ago • 1 comments

This is designed to make it easy to extend a Punctuated from an iterator over another Punctuated:

  1. Auto-insert extra punctuation if extend-target does not have trailing comma. This is a breaking change due to the extra Default bound, so I may need to remove it.
  2. Support extension from reference types.
  3. Support cloned over a Pairs iterator.

The last two are redundant with each other, from the POV of the motivation.

dhardy avatar Nov 10 '21 10:11 dhardy

BTW I'm waiting on comment before looking at CI failures. Quite possibly the Default bound needs to be removed?

dhardy avatar Nov 11 '21 08:11 dhardy

I picked up two of these changes in #1255 and #1256. Thanks!

The rest is too far into diminishing returns I think. For example .map(Pair::cloned) supersedes the need for a new ClonedPairs iterator type.

dtolnay avatar Dec 04 '22 21:12 dtolnay

Thanks!

dhardy avatar Dec 05 '22 09:12 dhardy