Skip to content

Alow Mutating Entry keys and iterator keys#335

Merged
cuviper merged 3 commits intoindexmap-rs:masterfrom
epage:mut
Jul 31, 2024
Merged

Alow Mutating Entry keys and iterator keys#335
cuviper merged 3 commits intoindexmap-rs:masterfrom
epage:mut

Conversation

@epage
Copy link
Contributor

@epage epage commented Jul 29, 2024

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

Fixes #334

epage added 2 commits July 27, 2024 21:05
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.

@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
@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