-
Notifications
You must be signed in to change notification settings - Fork 315
Add conversion from Bytes to Vec<u8> #547
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
Merged
Darksonn
merged 27 commits into
tokio-rs:master
from
NobodyXu:feature/into-vec-for-bytes
Jul 13, 2022
Merged
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
90e00ee
Impl `From<Bytes>` for `Vec<u8>`
NobodyXu 418f280
Fix into-vec impl for odd/even/shared vtable in `bytes.rs`
NobodyXu fcd5dc6
Fix invalid exclusive reborrowing in `bytes.rs`
NobodyXu 87d7275
Impl `test_bytes_into_vec` in `test_bytes_vec_alloc.rs`
NobodyXu afc8674
Impl `test_bytes_into_vec` in `test_bytes_odd_alloc.rs`
NobodyXu 8437da0
Fix leaking in `into_vec` impl
NobodyXu 977b5ff
Impl `test_bytes_into_vec` & `test_bytes_into_vec_promotable_even`
NobodyXu 01aaf19
Add tests for cases where `offset != 0` for vtable in `bytes.rs`
NobodyXu b43705f
Add test for `Bytes` created from `BytesMut` where `offset != 0`
NobodyXu 6ab1c25
Refactor: Extract fn `shared_to_vec_impl`
NobodyXu 697b299
Fix `shared_to_vec_impl`: Add `Acquire` fence
NobodyXu 4c74191
Refactor: Inline `dealloc_shared` that is used only once
NobodyXu b322d2d
Fix `shared_to_vec_impl`: Take `*mut Shared`
NobodyXu 015496b
Add convenient script `run_tests.sh`
NobodyXu 40f481b
Fix code style in `shared_to_vec_impl`
NobodyXu 819968c
Refactor `shared_to_vec`: Avoid unnecessary deref
NobodyXu b1e7414
Refactor: Extract fn `promoteable_to_vec_impl`
NobodyXu 730eaaf
Fix `promoteable_to_vec_impl`: Copy back buffer
NobodyXu bf4ac42
Refactor: Extract `promoteable_to_vec`
NobodyXu b5e67e3
Refactor: Inline `promotable_to_vec_impl`
NobodyXu 21fe23a
Rm run_tests.sh
NobodyXu ff47582
Use `slice::to_vec` explicitly in `static_to_vec`
NobodyXu 9cdd8c5
Explicitly `drop` the shared
NobodyXu f092e6d
Use `slice::to_vec` in `shared_to_vec_impl`
NobodyXu 7eb6ca8
Use `slice::to_vec` in `shared_v_to_vec`
NobodyXu 5ed21db
Fix `bytes_mut::shared_v_to_vec`: Avoid mut ref
NobodyXu 0cd3f9e
Fix `shared_to_vec_impl`: Use `compare_exchange`
NobodyXu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.