syn icon indicating copy to clipboard operation
syn copied to clipboard

Add method to Punctuated to remove trailing punctuation

Open programmerjake opened this issue 3 years ago • 0 comments

I have a Path for an enum variant like my_mod::MyType::MyVariant, and I can remove the MyVariant part with path.segments.pop(), however that gives me a path like my_mod::MyType:: which is syntatically incorrect for a Path to a type.

Punctuated should have a method to remove the trailing ::.

programmerjake avatar Aug 03 '21 03:08 programmerjake