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

Use borrowing read_event instead of buffering read_event_into where possible #426

Merged
merged 2 commits into from
Jul 18, 2022

Conversation

Mingun
Copy link
Collaborator

@Mingun Mingun commented Jul 18, 2022

This PR changes almost all usages of read_event_into in tests by read_event. The notable exception is the Reader's documentation where I've left read_event_into as an example.

The same changes was proposed in #425, but their was mixed with another changes, that makes that another changes less visible in the read_event_into->read_event noise.

This PR also removes direct examples from the lib.rs, because they just duplicate examples in the Reader and Writer. The examples in the Readme also was synchronized with thoses two.

…n most cases

Reader's example still uses `read_event_into()` to let the reader to understand
how to use reader in a generic case
@Mingun Mingun added the documentation Issues about improvements or bugs in documentation label Jul 18, 2022
@Mingun Mingun requested a review from dralley July 18, 2022 14:39
@codecov-commenter
Copy link

Codecov Report

Merging #426 (c49c349) into master (068b36e) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
- Coverage   49.53%   49.51%   -0.03%     
==========================================
  Files          22       22              
  Lines       13861    13847      -14     
==========================================
- Hits         6866     6856      -10     
+ Misses       6995     6991       -4     
Flag Coverage Δ
unittests 49.51% <0.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
examples/custom_entities.rs 0.00% <0.00%> (ø)
src/lib.rs 12.33% <0.00%> (ø)
src/reader.rs 60.36% <0.00%> (+0.23%) ⬆️
src/writer.rs 49.01% <0.00%> (-0.28%) ⬇️
src/de/mod.rs 77.86% <0.00%> (-0.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 068b36e...c49c349. Read the comment docs.

@dralley dralley merged commit b456b5a into tafia:master Jul 18, 2022
@Mingun Mingun deleted the read-event branch July 18, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues about improvements or bugs in documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants