Closed birkenfeld closed 5 years ago
I agree that this unfortunate naming, as with_capacity
is used by the Rust standard library with different semantics. I think we should maybe deprecate with_capacity
and use a less-confusing name; e.g. with_size
.
Should be fixed by PR #272.
If you create a new message with capacity and send it, you'd expect a message with size zero to be sent. However, the message gets initialized to have the size equal the capacity.
Since I don't see a way to set the size manually afterwards, I think we need document this behavior carefully.