Skip to content

Should vec::reserve reserve the exact amount or in powers of two? #2071

Closed
@brson

Description

@brson

Currently it's exact, but there are places in vec that use it in conjuction with next_power_of_two to do it the other way, and #2062 also wants to reserve in powers of two.

Clearly there should be two different versions. Should the default be exact? If so, what should the next_power_of_two version be called?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions