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 flush underlying writer on explicit flush call, not full buffer #174


Copy link

@owst owst commented Oct 6, 2019

Fixes #173

Copy link
Contributor Author

@owst owst commented Dec 1, 2019

Hi @BurntSushi, any chance you would be able to take a look at this PR? The issue it causes in xsv (BurntSushi/xsv#151) is quite annoying - it'd be great to have it fixed. Thanks!

Copy link
Contributor Author

@owst owst commented Jan 7, 2020

Hi @BurntSushi sorry to pester again, but any chance you can take a look at this PR and then hopefully get BurntSushi/xsv#151 resolved?

Copy link

@BurntSushi BurntSushi left a comment

Thank you for digging into this and coming up with a fix. This all looks great to me.

Apologies for the late attention, but I've been inactive for a bit.

// As the buffer size is 4 we should write each record separately, and
// flush when explicitly called and implictly in into_inner.
assert_eq!(got, ">a,b\n<>c,d\n<!>e,f\n<!");
Copy link

@BurntSushi BurntSushi Jan 7, 2020

Choose a reason for hiding this comment

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

Great test, thank you!

@BurntSushi BurntSushi merged commit e2c2468 into BurntSushi:master Jan 7, 2020
2 checks passed
Copy link

@BurntSushi BurntSushi commented Jan 7, 2020

This PR is in csv 1.1.2 on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

2 participants