-
Notifications
You must be signed in to change notification settings - Fork 109
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
Unnecessary Fn
bound for SizeError::map_src
.
#2009
Comments
jswrenn
added a commit
that referenced
this issue
Nov 4, 2024
This is fixed in 0.8.9. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am implementing a small wrapper over
read_from_bytes
that allows working over types likeBytes
instead of&[u8]
. As such I want to change theSrc
bound to beBytes
instead of&[u8]
.However, the bound on
map_src
is unnecessarily aFn(Src) -> NewSrc
which implies it would be callable multiple times. This is inconsistent with other forms ofmap
which useFnOnce
. This is a problem for me as I cannot simplymap_src(|_| bytes_buf)
as that moves ownership, giving me the errorEasy to fix here with a clone, sure. But it's not ideal.
I have a feeling this can be fixed without a breaking change, but I'm not 100% certain.
The text was updated successfully, but these errors were encountered: