Skip to content

Comments

Implement read_text_into() and read_text_into_async()#941

Merged
Mingun merged 7 commits intotafia:masterfrom
Mingun:full-cover
Feb 20, 2026
Merged

Implement read_text_into() and read_text_into_async()#941
Mingun merged 7 commits intotafia:masterfrom
Mingun:full-cover

Conversation

@Mingun
Copy link
Collaborator

@Mingun Mingun commented Feb 18, 2026

This PR changes buffered readers in that way that buf will now populated with the > and ; characters (closing character of a markup and a general entity reference). Previously they do not included in the buffer because events does not use them, that's created difficulties when we wanted to read markup data as a string.

Previous PR #936 enables inclusion of < character to the buffer, so now all data is included and we can finally implement #483 for buffered readers.

Fixes #483

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 78.81356% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.99%. Comparing base (d1acdb5) to head (f8e8857).
⚠️ Report is 51 commits behind head on master.

Files with missing lines Patch % Lines
src/reader/async_tokio.rs 4.34% 22 Missing ⚠️
src/reader/state.rs 90.00% 3 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #941      +/-   ##
==========================================
- Coverage   58.08%   54.99%   -3.10%     
==========================================
  Files          42       44       +2     
  Lines       15513    16869    +1356     
==========================================
+ Hits         9011     9277     +266     
- Misses       6502     7592    +1090     
Flag Coverage Δ
unittests 54.99% <78.81%> (-3.10%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Mingun
Copy link
Collaborator Author

Mingun commented Feb 18, 2026

I realized, that actually need to return BytesText instead of Cow<str>, because user may want to normalize EOLs which depends on XML version...

@Mingun Mingun marked this pull request as draft February 18, 2026 19:20
Copy and adapt tests in tests/ directory from borrowed variant
Copy фотв adapt documentation of new methods from the read_text methods
@Mingun Mingun marked this pull request as ready for review February 19, 2026 19:38
@Mingun Mingun merged commit b8eba9a into tafia:master Feb 20, 2026
7 checks passed
@Mingun Mingun deleted the full-cover branch February 20, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting the entire text content as a String between two tags

2 participants