zed/crates/collections
Eric Holk 54a95e717d
Add VecMap::entry_ref (#52601)
Thinking more on #52596, I realized the `entry` method needs a key by
value, which meant we were always cloning a path list even if it was
already in the map. This PR adds an `entry_ref` that takes the key by
reference and delays cloning the key until we know we're going to be
inserting.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-03-27 18:06:56 -07:00
..
src Add VecMap::entry_ref (#52601) 2026-03-27 18:06:56 -07:00
Cargo.toml
LICENSE-APACHE