Skip to content

Add optional support for indexmap Map/Set types#77

Merged
sunshowers merged 2 commits into
oxidecomputer:mainfrom
scoopr:indexmap
May 14, 2026
Merged

Add optional support for indexmap Map/Set types#77
sunshowers merged 2 commits into
oxidecomputer:mainfrom
scoopr:indexmap

Conversation

@scoopr
Copy link
Copy Markdown
Contributor

@scoopr scoopr commented Apr 1, 2026

Adds an optional feature indexmap for the IndexMap and IndexSet types.

The implementation is mostly just copy&pasted btreemap/hashmap, but as those used the very handy map_diff/set_diff macros, the implementation is quite minimal.

@scoopr
Copy link
Copy Markdown
Contributor Author

scoopr commented Apr 1, 2026

Ah it seems I forgot to test without default-features/std.
It may be few days before I get back to this.

@scoopr
Copy link
Copy Markdown
Contributor Author

scoopr commented Apr 8, 2026

I made the indexmap feature to require alloc, so now it should work with the --no-default-features.

It seems pushing doesn't retrigger the CI though, but wouldn't like to spam closing and opening of issues. (must of been a me-problem, it did re-run them)

@scoopr
Copy link
Copy Markdown
Contributor Author

scoopr commented Apr 13, 2026

Ah, finally, the CI is happy :)

Copy link
Copy Markdown
Collaborator

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment on lines +16 to +17
let a: IndexSet<_> = [0, 1, 2, 3, 4, 5].into_iter().collect();
let b: IndexSet<_> = [3, 4, 5, 6, 7, 8].into_iter().collect();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just did a small tweak here to avoid using the fully-qualified name. (Not sure if you used an LLM to write this -- that's okay but unnecessarily using fully-qualified names is something Claude in particular is prone to do, and something to watch out for.)

@sunshowers sunshowers merged commit d601287 into oxidecomputer:main May 14, 2026
3 checks passed
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