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
Taking a Vec here means the client is likely to make an unneeded copy of the input data. Turning this parameter into a &[u8] means adding a lifetime parameter to the whole of BufferType...
Maybe the solution is to use the types of the members directly for Buffer::new, and remove BufferType altogether? This would need a new trait to obtain the (ptr, size) tuple but is probably cleaner.
The text was updated successfully, but these errors were encountered:
Taking a
Vec
here means the client is likely to make an unneeded copy of the input data. Turning this parameter into a&[u8]
means adding a lifetime parameter to the whole ofBufferType
...Maybe the solution is to use the types of the members directly for
Buffer::new
, and removeBufferType
altogether? This would need a new trait to obtain the(ptr, size)
tuple but is probably cleaner.The text was updated successfully, but these errors were encountered: