- May 28, 2021
-
-
Markus Becker authored
-
- Nov 05, 2020
-
-
Yu Ding authored
-
- Apr 23, 2020
- Mar 30, 2020
-
-
Yu Ding authored
-
- Jan 27, 2020
-
-
Yu Ding authored
Fix tests
-
- Jan 23, 2020
-
-
Sean McArthur authored
-
Stepan Koltsov authored
Use case: ``` let bytes: Bytes = ... let subbytes = bytes.slice(a..b); // where a == b let slice = &subbytes[..]; let slice_bytes = bytes.slice_ref(slice); ``` Last line should not panic, because `slice` object is derived from the original `Bytes` object. Before this commit it panics, because `Bytes::slice` returns a fresh `Bytes` object when `begin == end`.
-
Sean McArthur authored
-
南浦月 authored
-
Nikhil Benesch authored
* Remove incorrect comment about behavior of put_slice * Improve grammar and clarity of BytesMut documentation
-
Andrew Tunnell-Jones authored
-
John-John Tedro authored
-
Stepan Koltsov authored
"Promotable" `Bytes` object is constructed from disassembling a boxed slice object, not a vec. Thus we should reassemble data into a boxed slice, not into a vec. Although, it does not create any problems in practice (`Box<[u8]>` is allocated exactly the same way as `Vec<u8>`), technically it is a violation of `Vec::from_raw_parts` spec which says that a pointer "needs to have been previously allocated via `String`/`Vec<T>`".
-
Sean McArthur authored
-
- Jan 09, 2020
-
-
Stepan Koltsov authored
-
- Jan 08, 2020
-
-
Sean McArthur authored
-
- Dec 19, 2019
-
-
Thayne McCombs authored
-
- Dec 17, 2019
-
-
Sean McArthur authored
This separates the `SharedVtable` into 3: - `PromotableEvenVtable`: The original `SharedVtable`, which will promote the `Vec` to `Shared` on the first clone, and is selected when the `Vec`'s pointer has the LSB unset. - `PromotableOddVtable`: Similar to the `PromotableEvenVtable`, but selected when the `Vec`'s pointer has the LSB set. This vtable differs in the masking used when reconstructing the `Vec`. - `SharedVtable`: This no longer checks if its current kind is `VEC` or `ARC`, and is only created by the "promotable" vtables. This also adds a test using an "odd" global allocator that purposefully bumps all pointers with alignment of 1. Closes #343
-
- Dec 12, 2019
-
-
Sean McArthur authored
-
Sean McArthur authored
-
Steven Fackler authored
Closes #340
-
- Dec 10, 2019
-
-
Sean McArthur authored
-
Sean McArthur authored
-
- Dec 04, 2019
-
-
Sean McArthur authored
-
- Dec 01, 2019
-
-
Mikhail Zabaluev authored
When the length to truncate is greater than the buffer's current length, do nothing instead of clearing the contents.
-
- Nov 27, 2019
-
-
Sean McArthur authored
-
Steven Fackler authored
-
Sean McArthur authored
-
- Nov 26, 2019
-
-
Steven Fackler authored
-
- Nov 25, 2019
-
-
Steven Fackler authored
-
Carl Lerche authored
-
Sean McArthur authored
-
- Nov 20, 2019
-
-
Sean McArthur authored
This type is the counterpart to BufExt::take. It limits how many bytes some `BufMut` can actually be filled with.
-
Carl Lerche authored
remove either feature
-
Carl Lerche authored
This brings `BytesMut` in line with `Vec<u8>` behavior. This also fixes an existing bug in BytesMut::bytes_mut that exposes invalid slices. The bug was recently introduced and was only on master and never released to `crates.io`. In order to fix a test, `BufMutExt::chain_mut` is provided. Withou this, it is not possible to chain two `&mut [u8]`. Closes #170
-
Andrew Tunnell-Jones authored
Rust versions bumped to the minimum needed for const slice len.
-
- Nov 13, 2019
-
-
Sean McArthur authored
-
- Nov 12, 2019
-
-
Sean McArthur authored
Makes the short-circuit checks inline-able, and the moves the actual reserving code to an inner function.
-
- Nov 05, 2019
-
-
Sean McArthur authored
-