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

Fixed expand empty not expanding tags with attributes #704

Merged
merged 5 commits into from
Jan 21, 2024

Conversation

M-Valts
Copy link
Contributor

@M-Valts M-Valts commented Jan 12, 2024

In PR #620 the expand_empty_elements function was added to the serializer. With the current implementation only unit variants are expanded, but if a tag has an attribute it would not expand the tag which seems inconsistent.

Copy link
Collaborator

@Mingun Mingun left a comment

Choose a reason for hiding this comment

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

Could you add tests for that? There are no writer-only tests so I suggest to create tests/writer-config.rs and add test for expand option there (it then will be filled with tests for other options as well, similarly to reader-config.rs).

src/se/element.rs Outdated Show resolved Hide resolved
Changelog.md Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (de61fa1) 65.06% compared to head (7b9653b) 65.31%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #704      +/-   ##
==========================================
+ Coverage   65.06%   65.31%   +0.25%     
==========================================
  Files          38       38              
  Lines       17954    18131     +177     
==========================================
+ Hits        11682    11843     +161     
- Misses       6272     6288      +16     
Flag Coverage Δ
unittests 65.31% <100.00%> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mingun
Copy link
Collaborator

Mingun commented Jan 14, 2024

Thanks @M-Valts. I still wait tests to ensure that now it works in all situations.

@M-Valts M-Valts requested a review from Mingun January 17, 2024 06:03
@Mingun Mingun merged commit 83fc2d6 into tafia:master Jan 21, 2024
6 checks passed
@Mingun
Copy link
Collaborator

Mingun commented Jan 21, 2024

Thanks, @M-Valts !

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.

4 participants