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

chore: Replace generational-arena with slotmap #15383

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

torokati44
Copy link
Member

@torokati44 torokati44 commented Mar 1, 2024

Because generational-arena is unmaintained, and slotmap is the recommended alternative.

Most of it was a trivial search-and-replace, except for:

  • That .rev() from LoadManager is gone, because this iterator type does not support it.
    • Note that iteration order was undefined before, and is undefined now. Therefore, we shouldn't have been relying on this already.
    • Replaced by a clumsy hand-cranked reversing solution, but it should behave the same (undefined, but accidentally usually correct) way.
  • loader.rs has sometimes used Index instead of the Handle type it defines, in its API.
    • We should probably also rename that to match the convention of the rest of the handle types.
  • The dummy handle in the socket tests was replaced by the default, I hope that's fine, @kjarosh.

In the future, we could consider:

@torokati44 torokati44 force-pushed the slotmap branch 2 times, most recently from 717be48 to 396543c Compare March 1, 2024 21:50
@torokati44
Copy link
Member Author

I'll try to ping @relrelb due to the iteration order thingy...

@torokati44 torokati44 marked this pull request as draft March 2, 2024 00:11
@torokati44 torokati44 marked this pull request as ready for review March 2, 2024 11:19
web/Cargo.toml Outdated Show resolved Hide resolved
@torokati44 torokati44 force-pushed the slotmap branch 2 times, most recently from 3ffdba2 to d59e925 Compare March 2, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants