Skip to content

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
@tguichaoua tguichaoua deleted the punctuated_drain branch October 19, 2025 12:51
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.

2 participants