-
Notifications
You must be signed in to change notification settings - Fork 188
Description
toml_edit presents Table as a mapping between Key and Value with KeyMut for providing access to the subset of key functionality that the user can modify. Internally, this is stored as IndexMap<String, (Key, Value)>, where Key contains a String, among other data.
Key.get().clone() to get the String key is showing up in my benchmarks in parsing a real-world Cargo.toml file. I'm exploring my options for avoiding that
I hadn't noticed MutableKeys before and it seems like a good start by allowing me to instead do IndexMap<Key, Value>. Some parts I'm missing for maintaining my KeyMut access for users:
MutableKeys::iter_full_mut2MutableOccupiedEntrykeys::get_full_mut2
There may be more as I've not fully gone through my compilation errors. I'm more wondering if this direction is viable before I continue down this path.
I'd be willing to contribute these if there is interest.