Skip to content

feat: add remove api - #30

Merged
aapoalas merged 1 commit into
mainfrom
add-remove-api
Sep 22, 2025
Merged

feat: add remove api#30
aapoalas merged 1 commit into
mainfrom
add-remove-api

Conversation

@omfj

@omfj omfj commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

Adds a SoAVec::remove() API.

Removes the element at the specified index. Panics if index is greater or equal the length of the vec. Returns the owned element.

Closes #22.

@omfj omfj added the enhancement New feature or request label Sep 22, 2025
@omfj omfj self-assigned this Sep 22, 2025
@omfj
omfj requested review from Reinsdyret and aapoalas September 22, 2025 13:51

@aapoalas aapoalas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Did you create the implementation by yourself from scratch, or was it based on the internals of Vec::remove?

@omfj

omfj commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator Author

It is based on the internals of Vec::remove. I tried to make it as one to one as possible so it would be easy to understand.

@aapoalas

Copy link
Copy Markdown
Member

It is based on the internals of Vec::remove. I tried to make it as one to one as possible so it would be easy to understand.

Nice! <3

@aapoalas
aapoalas merged commit f1bceee into main Sep 22, 2025
3 checks passed
@aapoalas
aapoalas deleted the add-remove-api branch September 22, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove API

2 participants