bytes icon indicating copy to clipboard operation
bytes copied to clipboard

Unnecessary `Sized` constraint on `BufMut::put` method?

Open GrizzlT opened this issue 1 year ago • 1 comments

When using this crate I noticed that the BufMut::put method requires Self to be Sized.

This makes it difficult for me to use that function in ?Sized contexts for better optimizations. Is there a reason this trait bound is necessary?

I looked at BufMut::put and BufMut::put_slice and it seems that neither method uses functions that require Self: Sized while put does require Sized and put_slice does not. Could the trait bound be removed from the api?

GrizzlT avatar May 08 '23 16:05 GrizzlT