dtolnay / cxx

Safe interop between Rust and C++
https://cxx.rs
Apache License 2.0
5.82k stars 330 forks source link

CxxVector: implement reserve() and capacity() #1300

Open russelltg opened 9 months ago

russelltg commented 9 months ago

Efficient insertions into CxxVector requires reserving additional capacity. This also adds a way to query current capacity.

Also implement extend, which can use the size hint