- Fix memory leak when using
to_vecwithBytes::from_owner(#773)
- Add feature to support platforms without atomic CAS (#467)
try_get_*methods forBuftrait (#753)- Implement
Buf::chunks_vectoredforTake(#617) - Implement
Buf::chunks_vectoredforVecDeque<u8>(#708)
- Remove incorrect guarantee for
chunks_vectored(#754) - Ensure that tests pass under
panic=abort(#749)
- Add
Bytes::from_ownerto enable externally-allocated memory (#742)
- Fix typo in Buf::chunk() comment (#744)
- Replace BufMut::put with BufMut::put_slice in Writer impl (#745)
- Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (#743)
- Guarantee address in
split_off/split_tofor empty slices (#740)
- Fix default impl of
Buf::{get_int, get_int_le}(#732)
- Fix double spaces in comments and doc comments (#731)
- Ensure BytesMut::advance reduces capacity (#728)
This release reverts the following change due to a regression:
- Reuse capacity when possible in
<BytesMut as Buf>::advanceimpl (#698)
The revert can be found at #726.
- Add conversion from
BytestoBytesMut(#695, #710) - Add reclaim method without additional allocation (#686)
- Clarify how
BytesMut::zeroedworks (#714) - Clarify the behavior of
Buf::chunk(#717)
- Change length condition of
BytesMut::truncate - Reuse capacity when possible in
<BytesMut as Buf>::advanceimpl (#698) - Improve
must_usesuggestion ofBytesMut::split(#699)
- Use
ManuallyDropinstead ofmem::forget(#678) - Don't set
leninBytesMut::reserve(#682) - Optimize
Bytes::copy_to_bytes(#688) - Refactor
BytesMut::truncate(#694) - Refactor
BytesMut::resize(#696) - Reorder assertion in
Bytes::split_to,Bytes::split_off(#689, #693) - Use
offset_fromin more places (#705) - Correct the wrong usage of
IntoIter(#707)
This release fixes a bug where Bytes::is_unique returns incorrect values when
the Bytes originates from a shared BytesMut. (#718)
- Add
Bytes::is_unique(#643)
- Fix changelog typo (#628)
- Fix some spelling mistakes (#633)
- Typo fix (#637)
- Fix broken links (#639)
- Add security policy (#649)
- Move comment to correct constant (#629)
- Various cleanup (#635)
- Simplify
UninitSlice::as_uninit_slice_mut()logic (#644) - Use
self.instead ofSelf::(#642) BytesMut: Assert alignment ofShared(#652)- Remove unnecessary namespace qualifier (#660)
- Remove an unnecessary else branch (#662)
- Remove unreachable else branch (#661)
- make parameter mut in
From<Vec>(#667) - Restore commented tests (#665)
- Use
subinstead ofoffset(#668) - Calculate original capacity only if necessary (#666)
set_vec_posdoes not need a second parameter (#672)get_vec_pos: use&selfinstead of&mut self(#670)- Refactor
split_at/split_to(#663) - Use
Iteratorfrom the prelude (#673) copy_to_bytes: Add panic section to docs (#676)- Remove redundant reserve call (#674)
- Use
ManuallyDropinstead ofmem::forget(#675)
- Add
UninitSlice::{new,uninit}(#598, #599) - Implement
BufMutfor&mut [MaybeUninit<u8>](#597)
- Mark
BytesMut::extend_from_sliceas inline (#595)
- Make
IntoIterconstructor public (#581)
- Avoid large reallocations when freezing
BytesMut(#592)
- Document which functions require
std(#591) - Fix duplicate "the the" typos (#585)
- Rename and expose
BytesMut::spare_capacity_mut(#572) - Implement native-endian get and put functions for
BufandBufMut(#576)
- Don't have important data in unused capacity when calling reserve (#563)
Bytes::newetc should returnSelfnotBytes(#568)
- Fix unbounded memory growth when using
reserve(#560)
- Add
BytesMut::zeroed(#517) - Implement
Extend<Bytes>forBytesMut(#527) - Add conversion from
BytesMuttoVec<u8>(#543, #554) - Add conversion from
BytestoVec<u8>(#547) - Add
UninitSlice::as_uninit_slice_mut()(#548) - Add const to
Bytes::{len,is_empty}(#514)
- Reuse vector in
BytesMut::reserve(#539, #544)
- Make miri happy (#515, #523, #542, #545, #553)
- Make tsan happy (#541)
- Fix
remaining_mut()on chain (#488) - Fix amortized asymptotics of
BytesMut(#555)
- Redraw layout diagram with box drawing characters (#539)
- Clarify
BytesMut::unsplitdocs (#535)
BufMut::put_bytes(self, val, cnt)(#487)- Implement
From<Box<[u8]>>forBytes(#504)
- Override
put_slicefor&mut [u8](#483) - Panic on integer overflow in
Chain::remaining(#482) - Add inline tags to
UninitSlicemethods (#443) - Override
copy_to_bytesfor Chain and Take (#481) - Keep capacity when unsplit on empty other buf (#502)
- Clarify
BufMutallocation guarantees (#501) - Clarify
BufMut::put_intbehavior (#486) - Clarify actions of
clearandtruncate. (#508)
- mark
Vec::put_slicewith#[inline](#459)
- Fix deprecation warning (#457)
- use
Box::into_rawinstead ofmem::forget-in-disguise (#458)
- Rename
Buf/BufMutmethodsbytes()andbytes_mut()tochunk()andchunk_mut()(#450)
- remove unused Buf implementation. (#449)
API polish in preparation for a 1.0 release.
BufMutis now anunsafetrait (#432).BufMut::bytes_mut()returns&mut UninitSlice, a type owned bybytesto avoid undefined behavior (#433).Buf::copy_to_bytes(len)replacesBuf::into_bytes()(#439).Buf/BufMututility methods are moved onto the trait and*Exttraits are removed (#431).
BufMut::bytes_vectored_mut()(#430).newmethods on combinator types (#434).
- Improve
BytesMutto reuse buffer when fullyadvanced. - Mark
BytesMut::{as_mut, set_len}with#[inline]. - Relax synchronization when cloning in shared vtable of
Bytes. - Move
loomtodev-dependencies.
- Allow using the
serdefeature inno_stdenvironments (#385).
- Fix
BufMut::advance_mutto panic if advanced passed the capacity (#354).. - Fix
BytesMut::freezeignoring amount previouslyadvanced (#352).
- Make
Bytes::newaconst fn. - Add
From<BytesMut>forBytes.
- Fix reversed arguments in
PartialOrdforBytes. - Fix
Bytes::truncatelosing original capacity when repr is an unsharedVec. - Fix
Bytes::from(Vec)when allocator gaveVeca pointer with LSB set. - Fix panic in
Bytes::slice_refif argument is an empty slice.
must_useattributes tosplit,split_off, andsplit_tomethods (#337).
- Potential freeing of a null pointer in
Byteswhen constructed with an emptyVec<u8>(#341, #342). - Calling
Bytes::truncatewith a size large than the length will no longer clear theBytes(#333).
Limitmethodsinto_inner,get_ref,get_mut,limit, andset_limit(#325).
- Growth documentation for
BytesMut(#321)
- Potential overflow in
copy_to_slice
- Increased minimum supported Rust version to 1.39.
Bytesis now a "trait object", allowing for custom allocation strategies (#298)BytesMutimplicitly grows internal storage.remaining_mut()returnsusize::MAX(#316).BufMut::bytes_mutreturns&mut [MaybeUninit<u8>]to reflect the unknown initialization state (#305).Buf/BufMutimplementations for&[u8]and&mut [u8]respectively (#261).- Move
Buf/BufMut"extra" functions to an extension trait (#306). BufMutExt::limit(#309).Bytes::slicetakes aRangeBoundsargument (#265).Bytes::from_staticis now aconst fn(#311).- A multitude of smaller performance optimizations.
no_stdsupport (#281).get_*,put_*,get_*_le, andput_*leaccessors for handling byte order.BorrowMutimplementation forBytesMut(#185).
IntoBuf(#288).Bufimplementation for&str(#301).byteorderdependency (#280).iovecdependency, usestd::IoSliceinstead (#263).- optional
eitherdependency (#315). - optional
i128feature -- now available on stable. (#276).
- Implement
FromIterator<&'a u8>forBytesMut/Bytes(#244). - Implement
BufforVecDeque(#249).
- Use raw pointers for potentially racy loads (#233).
- Implement
BufReadforbuf::Reader(#232). - Documentation tweaks (#234).
- impl
BufandBufMutforEither(#225). - Add
Bytes::slice_ref(#208).
- Add 128 bit number support behind a feature flag (#209).
- Implement
IntoBuffor&mut [u8]
- Fix panic in
BytesMutFromIteratorimplementation. - Bytes: Recycle space when reserving space in vec mode (#197).
- Bytes: Add resize fn (#203).
- Make
BufandBufMutusable as trait objects (#186). - impl BorrowMut for BytesMut (#185).
- Improve accessor performance (#195).
- Implement FromIterator for Bytes/BytesMut (#148).
- Add
advancefn to Bytes/BytesMut (#166). - Add
unsplitfn toBytesMut(#162, #173). - Improvements to Bytes split fns (#92).
- Fix range bug in
Take::bytes - Misc performance improvements
- Add extra
PartialEqimplementations. - Add
Bytes::with_capacity - Implement
AsMut[u8]forBytesMut
- Add serde support behind feature flag
- Add
extend_from_sliceonBytesandBytesMut - Add
truncateandclearonBytes - Misc additional std trait implementations
- Misc performance improvements
- Fix Vec::advance_mut bug
- Bump minimum Rust version to 1.15
- Misc performance tweaks
- Misc performance tweaks
- Improved
Debugimplementation forBytes - Avoid some incorrect assert panics
- Expose
bufmodule and have most types available from there vs. root. - Implement
IntoBufforT: Buf. - Add
FromBufandBuf::collect. - Add iterator adapter for
Buf. - Add scatter/gather support to
BufandBufMut. - Add
Buf::chain. - Reduce allocations on repeated calls to
BytesMut::reserve. - Implement
Debugfor more types. - Remove
Sourcein favor ofIntoBuf. - Implement
ExtendforBytesMut.
- Initial release