forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#12931 - oxalica:feat/la-arena-apis, r=lnicola
Add more constructors and entry-APIs for la-arena `la-arena` on crates.io is quite helpful when just a thin wrapper for Vec with u32 indices is needed. But the current API is not ergonomic enough. This PR - Adds `ArenaMap::new`. Not sure why only `Arena` has it now. - Adds `Arena{,Map}::with_capacity` for known-size storage. - Adds entry-API for `ArenaMap` for easier `.entry(idx).or_default().push(value)` or `.entry(idx).or_insert(...)` operations.
- Loading branch information
Showing
2 changed files
with
129 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters