-
Notifications
You must be signed in to change notification settings - Fork 633
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
impl AsyncWrite for Cursor<Vec<u8>> doesn't extend vector as needed #1510
Comments
Actually the One thing that may be worth looking into is whether |
Chiming in here: I've def been missing an |
Test commit providing this behaviour via specialization: 7997066. |
The main issue is still that |
This implementation is currently provided by
impl<T: AsMut<[u8]>> AsyncWrite for Cursor<T>
which doesn't allow it to know that the vector is extendable.std
provides a separateimpl io::Write for Cursor<Vec<u8>>
which extends the vector as needed, but this means it can't provide a generic version.We're also missing the direct
impl AsyncWrite for Vec<u8>
which could be used instead (EDIT: Added in #1511). It almost seems like we should drop theCursor
wrapped implementations until we get anAsyncSeek
trait available?The text was updated successfully, but these errors were encountered: