Uh oh!
There was an error while loading. Please reload this page.
Add capacity-reserving functions for Vec and VecMap - #19516
Conversation
alexcrichton
commented
Dec 4, 2014
The addition of the The addition of the standard |
aliblong
commented
Dec 4, 2014
Okay, I'll resubmit a separate PR for each. |
Gankra
commented
Dec 4, 2014
reserve and reserve_exact don't super make sense on VecMap, because VecMap's capacity isn't really bound by number of elements. All that matters is that you have space for the largest index you store. Hence reserve_index. But yes I'm working on an RFC for this. |
aliblong
commented
Dec 4, 2014
@gankro Yeah, it was my thought that |
Part of #18424
Inspired by #19216
Adds functions for reserving capacity to Vec & VecMap, as per the collections reform. Also adds a capacity() function to VecMap.
The build fails the evec-in-struct debuginfo-gdb test (in my build environment at least), and I have no idea why. I asked around on IRC and Reddit, but didn't get a response.