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

@scoopr scoopr commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

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

scoopr commented Apr 1, 2026

Copy link
Copy Markdown
Contributor Author

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

@scoopr

scoopr commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

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

scoopr commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

Ah, finally, the CI is happy :)

@sunshowers sunshowers left a comment

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.

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.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one is on me, not llm, I have a habit of using fq names occasionally, but in this case that was indeed bogus, thanks!

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.

No worries!

@sunshowers sunshowers merged commit d601287 into oxidecomputer:main May 14, 2026
3 checks passed
@scoopr scoopr deleted the indexmap branch May 22, 2026 21:50
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