zed/crates/collections/Cargo.toml
Eric Holk 9fe2a602b9
Add VecMap and use it in ProjectGroupBuilder (#52596)
This adds a collection that has a map-like API but is backed by vectors.
For small collections, this often outperforms a HashMap because you
don't have the overhead of hashing things and everything is guaranteed
to be contiguous in memory.

I hand-rolled one of these in `ProjectGroupBuilder` but this factors it
into its own collection. This implements the API that
`ProjectGroupBuilder` needed, but if this becomes more widely used we
can expand to include more of the `HashMap` API.

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 20:09:47 +00:00

21 lines
353 B
TOML

[package]
name = "collections"
version = "0.1.0"
edition.workspace = true
publish = false
license = "Apache-2.0"
description = "Standard collection types used by Zed and GPUI"
[lints]
workspace = true
[lib]
path = "src/collections.rs"
doctest = false
[features]
test-support = []
[dependencies]
indexmap.workspace = true
rustc-hash.workspace = true