-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
It'd be nice to have a function that removes an element from the middle of a vector and replaces it with the element at the end. It's important that it not require a copy bound.
One place this would be useful is in pipes::select
, which must remove the selected endpoint from the list. Currently we have a linear time operation to rebuild the vector, while swap_remove
would make it a constant time operation. This could be important for performance in, for example, servo.
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.