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

Passing limitTo param from Parser.array() to enumerateAsArray #98

Closed
wants to merge 1 commit into from

Conversation

jasonmedeiros
Copy link

Otherwise, things like CSV.init(string: String, delimiter: Character = comma, loadColumns: Bool = true) will parse the whole string when just trying to get the headers.

For large inputs, this was noticeable wasted work.

I think this was an oversight, but it does break the test testThrowsOnInvalidData. I think that test is of dubious value and just kinda incidentally worked.

Otherwise, things like CSV.init(string: String, delimiter: Character = comma, loadColumns: Bool = true) will parse the whole string when just trying to get the headers.

I think this was an oversight, but it does break the test `testThrowsOnInvalidData`. I think that test is of dubious value and just kinda incidentally worked.
@DivineDominion
Copy link
Contributor

DivineDominion commented Nov 22, 2021

Thanks for bringing this up. Implemented a fix with tests for the Parser.


We've invited you to join the SwiftCSV GitHub organization – no pressure to accept! If you'd like more information on what that means, check out our contributor guidelines.

DivineDominion added a commit that referenced this pull request Nov 22, 2021
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.

3 participants