vortex icon indicating copy to clipboard operation
vortex copied to clipboard

Buffer::empty should not allocate

Open gatesn opened this issue 2 months ago • 0 comments

Describe the bug

Currently Buffer::empty goes via BufferMut::empty, but this forces an allocation.

If we use Bytes::empty instead, then it refers to a static empty bytes slice. Alignment checks may fail.. which we'll need to figure out.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

gatesn avatar Oct 23 '25 12:10 gatesn