about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-12 09:42:11 +0000
committerbors <bors@rust-lang.org>2018-05-12 09:42:11 +0000
commite6db79f2ca07e4e533f4e940462a42f1093e52f3 (patch)
tree785db4f903ca92acdb2e8bc90524fddab40cfebb /src/liballoc/tests
parent5f98fe714e8e5638fd38cb238c50508c2600002f (diff)
parente83c18f91d373592ecf7a0fbbc24d7597925af13 (diff)
downloadrust-e6db79f2ca07e4e533f4e940462a42f1093e52f3.tar.gz
rust-e6db79f2ca07e4e533f4e940462a42f1093e52f3.zip
Auto merge of #50352 - porglezomp:btree-no-empty-alloc, r=Gankro
Don't allocate when creating an empty BTree

Following the discussion in #50266, this adds a static instance of `LeafNode` that empty BTrees point to, and then replaces it on `insert`, `append`, and `entry`. This avoids allocating for empty maps.

Fixes #50266

r? @Gankro
Diffstat (limited to 'src/liballoc/tests')
0 files changed, 0 insertions, 0 deletions