bytes
bytes copied to clipboard
`const`-ify `BytesMut::len`, `BytesMut::is_empty`, and `BytesMut::capacity`,
Is there a way to create BytesMut in const? If not, this does not seem to be available in practice.
Ah, it was previously proposed, but I closed it for compatibility with future implementation changes. https://github.com/tokio-rs/bytes/pull/472#pullrequestreview-632946191
I guess there isn't, you're right. I think new
could be made const
, but I'm not sure how useful that would be.
Ah, yep, haha