Commit 805b5e2
committed
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.3 files changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
| |||
0 commit comments