-
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
Add async BufWriter #1608
Add async BufWriter #1608
Conversation
|
||
#[test] | ||
fn maybe_pending_buf_writer_seek() { | ||
// FIXME: when https://github.com/rust-lang-nursery/futures-rs/issues/1510 fixed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that AsyncSeek
has been merged, this can probably be fixed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I tried locally, it still didn't work...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, the choice currently is to have a Vec<u8>
which is AsyncWrite
and extends as needed or Cursor<Vec<u8>>
which is AsyncWrite + AsyncSeek
but doesn't extend as needed; #1510 is about whether we can have a type that implements both without having to drop the genericness of the current Cursor
implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I threw together a test commit and this can definitely be done via specialization: 7997066, if only it were close to stabilization.
This seems to be my 104th commit to this repository. |
\o/ |
Closes #1519