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

parsecsv fix style #17933

Merged
merged 28 commits into from
May 4, 2021
Merged

parsecsv fix style #17933

merged 28 commits into from
May 4, 2021

Conversation

juancarlospaco
Copy link
Collaborator

@juancarlospaco juancarlospaco commented May 3, 2021

  • parsecsv fix style, was using "my" instead of self, no logic change.
  • Added an {.inline.} for a tiny proc.

juancarlospaco and others added 27 commits September 2, 2020 17:31
@juancarlospaco juancarlospaco marked this pull request as ready for review May 3, 2021 23:39
@@ -97,10 +96,10 @@ proc raiseEInvalidCsv(filename: string, line, col: int,
e.msg = filename & "(" & $line & ", " & $col & ") Error: " & msg
raise e

proc error(my: CsvParser, pos: int, msg: string) =
raiseEInvalidCsv(my.filename, my.lineNumber, getColNumber(my, pos), msg)
proc error(self: CsvParser, pos: int, msg: string) {.inline.} =
Copy link

Choose a reason for hiding this comment

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

You said that there was no logic change, yet you introduced {.inline.} here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ye 🤷

Copy link
Member

Choose a reason for hiding this comment

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

Don't inline code that is off the critical path... Don't make error handling super fast, most of the time there is no error.

lib/pure/parsecsv.nim Outdated Show resolved Hide resolved
@Araq Araq merged commit bf5dfe4 into nim-lang:devel May 4, 2021
@juancarlospaco juancarlospaco deleted the csv branch May 4, 2021 11:23
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
* ReSync with Devel
* Fix style in parsecsv
* Update lib/pure/parsecsv.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
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