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

Alow Mutating Entry keys and iterator keys #335

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Jul 29, 2024

See toml-rs/toml#765 for an example use case

Fixes #334

I added `pub(crate) fn key_mut` to the different `Entry` types to limit
how much of their internals get exposed (as otherwise I'd have had to
make their fields `pub(crate)`.
@cuviper cuviper changed the title Alow Mutating Entyr keys and iterator keys Alow Mutating Entry keys and iterator keys Jul 29, 2024
@cuviper
Copy link
Member

cuviper commented Jul 29, 2024

See toml-rs/toml#765 for an example use case

Any performance numbers to share from that change?

@epage
Copy link
Contributor Author

epage commented Jul 30, 2024

Machine has been pretty jittery though,. so using callgrind I get

  • Before: 8,879,894
  • After: 8,678,207

This also cleaned up the code a lot.

src/map/mutable.rs Outdated Show resolved Hide resolved
@cuviper cuviper added this pull request to the merge queue Jul 31, 2024
Merged via the queue into indexmap-rs:master with commit 22c0b4e Jul 31, 2024
16 checks passed
@cuviper
Copy link
Member

cuviper commented Jul 31, 2024

Thanks! I've published 2.3.0 with these changes.

@epage epage deleted the mut branch July 31, 2024 21:18
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.

Expanding mut key API
2 participants