-
Notifications
You must be signed in to change notification settings - Fork 292
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 #257 - optimalstrategy:add-allocator-getters, r=Amanieu
Add an allocator() getter to HashMap and HashSet As far as I can tell, both HashMap and HashSet are currently missing an API to retrieve the underlying allocator, which makes using them less ergonomic due to the need to plumb it everywhere. [Vec](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.allocator) and [Box](https://doc.rust-lang.org/std/boxed/struct.Box.html#method.allocator) have this method, and I couldn't think of anything that would make its presence unsuitable, so this PR adds the getter to the collections.
- Loading branch information
Showing
3 changed files
with
18 additions
and
0 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
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