rust-embedded / heapless

Heapless, `static` friendly data structures
Apache License 2.0
1.56k stars 185 forks source link

Keep `Vec::capacity` const #498

Closed sosthene-nitrokey closed 4 months ago

sosthene-nitrokey commented 4 months ago

In 0.8.0 it was const, but this was removed in https://github.com/rust-embedded/heapless/pull/486, which would be an unexpected breaking change.

The other container types did not make the capacity method const, and therefore can kept with the normal name and the generic implementation.

No need for changelog for this change, since it affects b previous PR that has not been released.