-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Write impl on Vec<u8> is easy to misuse #23768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For clarity, the second call to cc @erickt I had concerns about this kind of thing when these impls were being introduced but I thought I convinced myself that this kind of thing couldn't happen. Did something change in the way we designed these impls since then? |
Possible solutions are to either remove the impl for |
This means passing in e.g. a `Vec<u8>` or `String` will work as intended, rather than deref-ing to `&mut [u8]` or `&mut str`. [breaking-change] Closes #23768
I believe the reason for the |
The text was updated successfully, but these errors were encountered: