Improve deprecation messages in events/attributes.rs - #1016
Conversation
| /// [`encoding`]: ../../index.html#encoding | ||
| #[cfg(any(doc, not(feature = "encoding")))] | ||
| #[deprecated = "use `Self::normalized_value()`"] | ||
| #[deprecated = "use `Self::normalized_value(XmlVersion::Implicit1_0)`"] |
There was a problem hiding this comment.
Strictly speaking the value you use here might depend on the actual XML version of the document - 1.0 is certainly the most common, and for many known documents the user may not need to check, but they probably should.
There was a problem hiding this comment.
At least in the case of unescaping events though, I'm working on some changes to EOL normalization that ought to make it unnecessary.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1016 +/- ##
==========================================
- Coverage 57.31% 55.08% -2.23%
==========================================
Files 46 51 +5
Lines 18197 18817 +620
==========================================
- Hits 10429 10366 -63
- Misses 7768 8451 +683
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I agree with @dralley -- the proposed change is the wrong way to migrate. The correct way is to read XML declaration and use the value, defined in it. |
Save users from having to read the source to retain the deprecated functionality by adding the necessary parameter changes to the deprecation notices.