Make Vec::set_len enforce the len <= cap invariant

I'm absolutely in favour of some more-realistic examples here. Maybe one that passes the buffer over FFI and then set_lens to number of items that external code claims to have written?

1 Like