Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Punctuated::drain(range) #1410

Closed
wants to merge 3 commits into from

Conversation

tguichaoua
Copy link

related to #1314

Add a drain(range) method to Punctuated that is similar to Vec::drain(range).

@tguichaoua tguichaoua changed the title dd Punctuated::remove(index) Add Punctuated::drain(range) Mar 19, 2023
Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you share the use case you have for this function?

@tguichaoua
Copy link
Author

Could you share the use case you have for this function?

I don't have a specific use case in mind. I added it to more convenient than calling remove (#1395) multiple times to remove a range.

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I am not interested in adding a function without a use case.

@dtolnay dtolnay closed this Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants