Add method to Punctuated to remove trailing punctuation #1043
Closed
Description
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 ::
.
Metadata
Assignees
Labels
No labels