You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
I was very surprised to learn that Buffer::len returns the number of bytes in the buffer, NOT the number of elements. This is very counter-intuitive and also goes against the docstring for Buffer, which states: The easiest way to think about Buffer<T> is being equivalent to a Arc<Vec<T>>
I suggest deprecating len and adding and adding two new methods, num_bytes and num_elements (or similar).
The text was updated successfully, but these errors were encountered:
I was very surprised to learn that
Buffer::len
returns the number of bytes in the buffer, NOT the number of elements. This is very counter-intuitive and also goes against the docstring forBuffer
, which states:The easiest way to think about Buffer<T> is being equivalent to a Arc<Vec<T>>
I suggest deprecating
len
and adding and adding two new methods,num_bytes
andnum_elements
(or similar).The text was updated successfully, but these errors were encountered: