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

Fix resusing process of scanning context #322

Merged
merged 1 commit into from Nov 14, 2022
Merged

Fix resusing process of scanning context #322

merged 1 commit into from Nov 14, 2022

Conversation

goccy
Copy link
Owner

@goccy goccy commented Nov 14, 2022

fix #316

@codecov-commenter
Copy link

Codecov Report

Merging #322 (937c167) into master (33858b4) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #322   +/-   ##
=======================================
  Coverage   75.63%   75.63%           
=======================================
  Files          13       13           
  Lines        4359     4359           
=======================================
  Hits         3297     3297           
  Misses        819      819           
  Partials      243      243           

Comment on lines +58 to +62
c.isRawFolded = false
c.isSingleLine = true
c.isLiteral = false
c.isFolded = false
c.literalOpt = ""

Choose a reason for hiding this comment

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

Individually zeroing fields keeps open the potential for this class of bug in the future if new fields are added to *Context. This is why the original proposal was to use a single assignment to *c only retaining the non-zero valued fields.

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.

May fail when parsing YAML many times in parallel ( with yaml.MapSlice )
3 participants