Skip to content

Releases: tokio-rs/bytes

Bytes v1.1.0

25 Aug 15:50
ebc61e5
Compare
Choose a tag to compare

1.1.0 (August 25, 2021)

Added

  • BufMut::put_bytes(self, val, cnt) (#487)
  • Implement From<Box<[u8]>> for Bytes (#504)

Changed

  • Override put_slice for &mut [u8] (#483)
  • Panic on integer overflow in Chain::remaining (#482)
  • Add inline tags to UninitSlice methods (#443)
  • Override copy_to_bytes for Chain and Take (#481)
  • Keep capacity when unsplit on empty other buf (#502)

Documented

  • Clarify BufMut allocation guarantees (#501)
  • Clarify BufMut::put_int behavior (#486)
  • Clarify actions of clear and truncate. (#508)

bytes v1.0.1

11 Jan 17:10
7b18c1c
Compare
Choose a tag to compare

Changed

  • mark Vec::put_slice with #[inline] (#459)

Fixed

  • Fix deprecation warning (#457)
  • use Box::into_raw instead of mem::forget-in-disguise (#458)

bytes v1.0.0

22 Dec 23:34
064ad9a
Compare
Choose a tag to compare

Commit to a public API with long-term support.

Changed

  • Rename Buf/BufMut, methods to chunk/chunk_mut (#450)

Removed

  • remove unused Buf implementation. (#449)

v0.6.0

20 Oct 23:09
b7f7582
Compare
Choose a tag to compare

API polish in preparation for a 1.0 release.

Changed

  • BufMut is now an unsafe trait (#432).
  • BufMut::bytes_mut() returns &mut UninitSlice, a type owned by bytes to
    avoid undefined behavior (#433).
  • Buf::copy_to_bytes(len) replaces Buf::into_bytes() (#439).
  • Buf/BufMut utility methods are moved onto the trait and *Ext traits are
    removed (#431).

Removed

  • BufMut::bytes_vectored_mut() (#430).
  • new methods on combinator types (#434).

v0.5.6

14 Jul 00:59
Compare
Choose a tag to compare
  • Improve BytesMut to reuse buffer when fully advanced.
  • Mark BytesMut::{as_mut, set_len} with #[inline].
  • Relax synchronization when cloning in shared vtable of Bytes.
  • Move loom to dev-dependencies.

v0.5.5

14 Jul 00:59
Compare
Choose a tag to compare

Added

  • Allow using the serde feature in no_std environments (#385).

Fix

  • Fix BufMut::advance_mut to panic if advanced passed the capacity (#354)..
  • Fix BytesMut::freeze ignoring amount previously advanced (#352).

v0.5.4

23 Jan 18:42
Compare
Choose a tag to compare

Added

  • Make Bytes::new a const fn.
  • Add From<BytesMut> for Bytes.

Fix

  • Fix reversed arguments in PartialOrd for Bytes.
  • Fix Bytes::truncate losing original capacity when repr is an unshared Vec.
  • Fix Bytes::from(Vec) when allocator gave Vec a pointer with LSB set.
  • Fix panic in Bytes::slice_ref if argument is an empty slice.

v0.5.3

12 Dec 20:04
Compare
Choose a tag to compare

Added

  • must_use attributes to split, split_off, and split_to methods (#337).

Fix

  • Potential freeing of a null pointer in Bytes when constructed with an empty Vec<u8> (#341, #342).
  • Calling Bytes::truncate with a size large than the length will no longer clear the Bytes (#333).

v0.5.2

27 Nov 21:02
Compare
Choose a tag to compare

Added

  • Limit methods into_inner, get_ref, get_mut, limit, and set_limit (#325).

v0.5.1

26 Nov 22:21
Compare
Choose a tag to compare

Fix

  • Growth documentation for BytesMut (#321)