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

Add bytes convenience methods #352

Merged
merged 1 commit into from
Oct 14, 2021
Merged

Add bytes convenience methods #352

merged 1 commit into from
Oct 14, 2021

Conversation

sagebind
Copy link
Owner

@sagebind sagebind commented Oct 9, 2021

Add a bytes method to ReadResponseExt and AsyncReadResponseExt. These convenience methods are similar to the text methods without text decoding involved. These can make some uses more concise, and also take care of reserving space in the buffer based on content length for optimal performance.

Add a `bytes` method to `ReadResponseExt` and `AsyncReadResponseExt`. These convenience methods are similar to the `text` methods without text decoding involved. These can make some uses more concise, and also take care of reserving space in the buffer based on content length for optimal performance.
@codecov
Copy link

codecov bot commented Oct 9, 2021

Codecov Report

Merging #352 (f04ccef) into master (319b544) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #352      +/-   ##
==========================================
+ Coverage   71.57%   71.76%   +0.19%     
==========================================
  Files          60       60              
  Lines        3261     3287      +26     
==========================================
+ Hits         2334     2359      +25     
- Misses        927      928       +1     
Impacted Files Coverage Δ
src/response.rs 71.69% <100.00%> (+11.17%) ⬆️
tests/response_body.rs 100.00% <100.00%> (ø)
src/agent/mod.rs 68.93% <0.00%> (-0.49%) ⬇️

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 319b544...f04ccef. Read the comment docs.

@sagebind sagebind marked this pull request as ready for review October 13, 2021 00:01
@sagebind sagebind merged commit 77fcf7f into master Oct 14, 2021
@sagebind sagebind deleted the bytes-method branch October 14, 2021 01:10
@sagebind sagebind added this to the 1.6.0 milestone Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant