syn icon indicating copy to clipboard operation
syn copied to clipboard

Consider allowing Punctuated to be indexed with a range

Open dtolnay opened this issue 7 years ago • 1 comments

Use case from #rust: checking if the segments[..segments.len() - 1] prefix of a Path is equal to some specific prefix.

dtolnay avatar Jan 23 '18 08:01 dtolnay

I've also hit a use case where I wanted to remove a variant from an enum, but Punctuated<Variant, Comma> doesn't support .remove(idx)

Kixiron avatar Jul 14 '20 02:07 Kixiron

I am not planning to pursue this myself, but if someone else still has this use case, then I would be open to evaluating a PR.

dtolnay avatar Apr 17 '24 21:04 dtolnay