Skip to content

Add method to Punctuated to remove trailing punctuation #1043

Closed
@programmerjake

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions