Make BytesCData decode method public#857
Make BytesCData decode method public#857Mingun merged 1 commit intotafia:masterfrom mematthias:master
Conversation
Mingun
left a comment
There was a problem hiding this comment.
Could you also add a changelog entry similarly to existing entries?
| /// Gets content of this text buffer in the specified encoding | ||
| pub(crate) fn decode(&self) -> Result<Cow<'a, str>, EncodingError> { | ||
| pub fn decode(&self) -> Result<Cow<'a, str>, EncodingError> { |
There was a problem hiding this comment.
Also need to change doc string, because it is currently outdated. Will be used an encoding of a reader from which this event was produced.
|
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 #857 +/- ##
==========================================
+ Coverage 60.21% 60.74% +0.53%
==========================================
Files 41 41
Lines 16021 16047 +26
==========================================
+ Hits 9647 9748 +101
+ Misses 6374 6299 -75
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks! |
Currently, retrieving the decoded string content of a
quick_xml::events::Event::CData(cdata)requires manually obtaining the Decoder instance from the Reader and callingreader.decoder().decode(cdata.as_ref())This PR addresses this by changing the visibility of the internal decode method associated with BytesCData from
pub(crate)topub.This enables users to directly call the decoding logic on the BytesCData instance itself: