Skip to content
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

Only increase cursor if file success to write #435

Merged
merged 3 commits into from
Jan 16, 2023

Conversation

eddyxu
Copy link
Contributor

@eddyxu eddyxu commented Jan 16, 2023

No description provided.

@eddyxu eddyxu self-assigned this Jan 16, 2023
*this.cursor += buf.len();
this.writer.as_mut().poll_write(cx, buf)
let p = this.writer.as_mut().poll_write(cx, buf);
match p {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does Poll::map_ok work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL. updated to map_ok

@eddyxu eddyxu merged commit e495ff7 into main Jan 16, 2023
@eddyxu eddyxu deleted the lei/async_write_track_cursor branch January 16, 2023 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants