-
Notifications
You must be signed in to change notification settings - Fork 246
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
Exclude namespace from tag name when comparing against field names #702
Conversation
This seems to address #683. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
==========================================
+ Coverage 61.24% 61.32% +0.08%
==========================================
Files 39 39
Lines 16277 16291 +14
==========================================
+ Hits 9969 9991 +22
+ Misses 6308 6300 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I would like to:
|
failures: de::map::test_not_in
failures: issue683
…ames This updates the "not_in" check that decides whether to pass a new start tag within a struct to a $value field, to only consider the local part of a QName. It now uses the same logic as the QNameDeserializer that is used for keys/fields already to ensure they stay in sync. Using the namespaced name in serde (i.e. `#[serde(rename = "ns1:tag")]`) fails with ``Custom("missing field `ns1:tag`")`` today, so this will not break existing code. Co-authored-by: Xiphoseer <[email protected]>
a79f473
to
6177189
Compare
Thanks @leftmostcat and @Xiphoseer ! |
Thanks for knocking this into shape and merging! |
Attempting to deserialize the following snippet to the following struct fails with "missing field
$value
" due tonot_in()
depending on the full name of the tag rather than the local name. This makes it impossible (or at least very difficult) to deserializexs:choice
values when they have a namespace prefix. Relying on local name addresses this without causing any noticeable complications.