bugfix for is_map_value stays true after vec of struct in enum #204
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into this head-scratcher today, history:
self.is_map_value
is true after parsing the<enumerationDefinition>
which when continuing, insideread_inner_value ()
, skips the StartElement of the next xml item (<messageDefinition>
) and then is confused because theenum Definition
has no variant for<field>
items.point 6. made me believe this is a bug and
self.is_map_value
should be reset when a new StartElement is coming up for an enum - since I don't fully grok the description what this struct field really does forread_inner_value()
, please double verify this is all good. All tests succeed, so I guess my fix is fine and has no side-effects?I'll adapt this patch however needed, I do realise this is more of a bug report including a potential fix than a PR. I'd like to advocate though to keep the test case of this PR at least please :)