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

Conversation

@owst
Copy link
Contributor

owst commented Oct 6, 2019

Fixes #173

@owst

This comment has been minimized.

Copy link
Contributor Author

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!

@owst

This comment has been minimized.

Copy link
Contributor Author

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
Owner

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<!");
}

This comment has been minimized.

Copy link
@BurntSushi

BurntSushi Jan 7, 2020

Owner

Great test, thank you!

@BurntSushi BurntSushi merged commit e2c2468 into BurntSushi:master Jan 7, 2020
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@BurntSushi

This comment has been minimized.

Copy link
Owner

BurntSushi commented Jan 7, 2020

This PR is in csv 1.1.2 on crates.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.