1# 1.5.0 (September 7, 2023) 2 3### Added 4 5- Add `UninitSlice::{new,init}` (#598, #599) 6- Implement `BufMut` for `&mut [MaybeUninit<u8>]` (#597) 7 8### Changed 9 10- Mark `BytesMut::extend_from_slice` as inline (#595) 11 12# 1.4.0 (January 31, 2023) 13 14### Added 15 16- Make `IntoIter` constructor public (#581) 17 18### Fixed 19 20- Avoid large reallocations when freezing `BytesMut` (#592) 21 22### Documented 23 24- Document which functions require `std` (#591) 25- Fix duplicate "the the" typos (#585) 26 27# 1.3.0 (November 20, 2022) 28 29### Added 30 31- Rename and expose `BytesMut::spare_capacity_mut` (#572) 32- Implement native-endian get and put functions for `Buf` and `BufMut` (#576) 33 34### Fixed 35 36- Don't have important data in unused capacity when calling reserve (#563) 37 38### Documented 39 40- `Bytes::new` etc should return `Self` not `Bytes` (#568) 41 42# 1.2.1 (July 30, 2022) 43 44### Fixed 45 46- Fix unbounded memory growth when using `reserve` (#560) 47 48# 1.2.0 (July 19, 2022) 49 50### Added 51 52- Add `BytesMut::zeroed` (#517) 53- Implement `Extend<Bytes>` for `BytesMut` (#527) 54- Add conversion from `BytesMut` to `Vec<u8>` (#543, #554) 55- Add conversion from `Bytes` to `Vec<u8>` (#547) 56- Add `UninitSlice::as_uninit_slice_mut()` (#548) 57- Add const to `Bytes::{len,is_empty}` (#514) 58 59### Changed 60 61- Reuse vector in `BytesMut::reserve` (#539, #544) 62 63### Fixed 64 65- Make miri happy (#515, #523, #542, #545, #553) 66- Make tsan happy (#541) 67- Fix `remaining_mut()` on chain (#488) 68- Fix amortized asymptotics of `BytesMut` (#555) 69 70### Documented 71 72- Redraw layout diagram with box drawing characters (#539) 73- Clarify `BytesMut::unsplit` docs (#535) 74 75# 1.1.0 (August 25, 2021) 76 77### Added 78 79- `BufMut::put_bytes(self, val, cnt)` (#487) 80- Implement `From<Box<[u8]>>` for `Bytes` (#504) 81 82### Changed 83 84- Override `put_slice` for `&mut [u8]` (#483) 85- Panic on integer overflow in `Chain::remaining` (#482) 86- Add inline tags to `UninitSlice` methods (#443) 87- Override `copy_to_bytes` for Chain and Take (#481) 88- Keep capacity when unsplit on empty other buf (#502) 89 90### Documented 91 92- Clarify `BufMut` allocation guarantees (#501) 93- Clarify `BufMut::put_int` behavior (#486) 94- Clarify actions of `clear` and `truncate`. (#508) 95 96# 1.0.1 (January 11, 2021) 97 98### Changed 99- mark `Vec::put_slice` with `#[inline]` (#459) 100 101### Fixed 102- Fix deprecation warning (#457) 103- use `Box::into_raw` instead of `mem::forget`-in-disguise (#458) 104 105# 1.0.0 (December 22, 2020) 106 107### Changed 108- Rename `Buf`/`BufMut` methods `bytes()` and `bytes_mut()` to `chunk()` and `chunk_mut()` (#450) 109 110### Removed 111- remove unused Buf implementation. (#449) 112 113# 0.6.0 (October 21, 2020) 114 115API polish in preparation for a 1.0 release. 116 117### Changed 118- `BufMut` is now an `unsafe` trait (#432). 119- `BufMut::bytes_mut()` returns `&mut UninitSlice`, a type owned by `bytes` to 120 avoid undefined behavior (#433). 121- `Buf::copy_to_bytes(len)` replaces `Buf::into_bytes()` (#439). 122- `Buf`/`BufMut` utility methods are moved onto the trait and `*Ext` traits are 123 removed (#431). 124 125### Removed 126- `BufMut::bytes_vectored_mut()` (#430). 127- `new` methods on combinator types (#434). 128 129# 0.5.6 (July 13, 2020) 130 131- Improve `BytesMut` to reuse buffer when fully `advance`d. 132- Mark `BytesMut::{as_mut, set_len}` with `#[inline]`. 133- Relax synchronization when cloning in shared vtable of `Bytes`. 134- Move `loom` to `dev-dependencies`. 135 136# 0.5.5 (June 18, 2020) 137 138### Added 139- Allow using the `serde` feature in `no_std` environments (#385). 140 141### Fix 142- Fix `BufMut::advance_mut` to panic if advanced passed the capacity (#354).. 143- Fix `BytesMut::freeze` ignoring amount previously `advance`d (#352). 144 145# 0.5.4 (January 23, 2020) 146 147### Added 148- Make `Bytes::new` a `const fn`. 149- Add `From<BytesMut>` for `Bytes`. 150 151### Fix 152- Fix reversed arguments in `PartialOrd` for `Bytes`. 153- Fix `Bytes::truncate` losing original capacity when repr is an unshared `Vec`. 154- Fix `Bytes::from(Vec)` when allocator gave `Vec` a pointer with LSB set. 155- Fix panic in `Bytes::slice_ref` if argument is an empty slice. 156 157# 0.5.3 (December 12, 2019) 158 159### Added 160- `must_use` attributes to `split`, `split_off`, and `split_to` methods (#337). 161 162### Fix 163- Potential freeing of a null pointer in `Bytes` when constructed with an empty `Vec<u8>` (#341, #342). 164- Calling `Bytes::truncate` with a size large than the length will no longer clear the `Bytes` (#333). 165 166# 0.5.2 (November 27, 2019) 167 168### Added 169- `Limit` methods `into_inner`, `get_ref`, `get_mut`, `limit`, and `set_limit` (#325). 170 171# 0.5.1 (November 25, 2019) 172 173### Fix 174- Growth documentation for `BytesMut` (#321) 175 176# 0.5.0 (November 25, 2019) 177 178### Fix 179- Potential overflow in `copy_to_slice` 180 181### Changed 182- Increased minimum supported Rust version to 1.39. 183- `Bytes` is now a "trait object", allowing for custom allocation strategies (#298) 184- `BytesMut` implicitly grows internal storage. `remaining_mut()` returns 185 `usize::MAX` (#316). 186- `BufMut::bytes_mut` returns `&mut [MaybeUninit<u8>]` to reflect the unknown 187 initialization state (#305). 188- `Buf` / `BufMut` implementations for `&[u8]` and `&mut [u8]` 189 respectively (#261). 190- Move `Buf` / `BufMut` "extra" functions to an extension trait (#306). 191- `BufMutExt::limit` (#309). 192- `Bytes::slice` takes a `RangeBounds` argument (#265). 193- `Bytes::from_static` is now a `const fn` (#311). 194- A multitude of smaller performance optimizations. 195 196### Added 197- `no_std` support (#281). 198- `get_*`, `put_*`, `get_*_le`, and `put_*le` accessors for handling byte order. 199- `BorrowMut` implementation for `BytesMut` (#185). 200 201### Removed 202- `IntoBuf` (#288). 203- `Buf` implementation for `&str` (#301). 204- `byteorder` dependency (#280). 205- `iovec` dependency, use `std::IoSlice` instead (#263). 206- optional `either` dependency (#315). 207- optional `i128` feature -- now available on stable. (#276). 208 209# 0.4.12 (March 6, 2019) 210 211### Added 212- Implement `FromIterator<&'a u8>` for `BytesMut`/`Bytes` (#244). 213- Implement `Buf` for `VecDeque` (#249). 214 215# 0.4.11 (November 17, 2018) 216 217* Use raw pointers for potentially racy loads (#233). 218* Implement `BufRead` for `buf::Reader` (#232). 219* Documentation tweaks (#234). 220 221# 0.4.10 (September 4, 2018) 222 223* impl `Buf` and `BufMut` for `Either` (#225). 224* Add `Bytes::slice_ref` (#208). 225 226# 0.4.9 (July 12, 2018) 227 228* Add 128 bit number support behind a feature flag (#209). 229* Implement `IntoBuf` for `&mut [u8]` 230 231# 0.4.8 (May 25, 2018) 232 233* Fix panic in `BytesMut` `FromIterator` implementation. 234* Bytes: Recycle space when reserving space in vec mode (#197). 235* Bytes: Add resize fn (#203). 236 237# 0.4.7 (April 27, 2018) 238 239* Make `Buf` and `BufMut` usable as trait objects (#186). 240* impl BorrowMut for BytesMut (#185). 241* Improve accessor performance (#195). 242 243# 0.4.6 (Janary 8, 2018) 244 245* Implement FromIterator for Bytes/BytesMut (#148). 246* Add `advance` fn to Bytes/BytesMut (#166). 247* Add `unsplit` fn to `BytesMut` (#162, #173). 248* Improvements to Bytes split fns (#92). 249 250# 0.4.5 (August 12, 2017) 251 252* Fix range bug in `Take::bytes` 253* Misc performance improvements 254* Add extra `PartialEq` implementations. 255* Add `Bytes::with_capacity` 256* Implement `AsMut[u8]` for `BytesMut` 257 258# 0.4.4 (May 26, 2017) 259 260* Add serde support behind feature flag 261* Add `extend_from_slice` on `Bytes` and `BytesMut` 262* Add `truncate` and `clear` on `Bytes` 263* Misc additional std trait implementations 264* Misc performance improvements 265 266# 0.4.3 (April 30, 2017) 267 268* Fix Vec::advance_mut bug 269* Bump minimum Rust version to 1.15 270* Misc performance tweaks 271 272# 0.4.2 (April 5, 2017) 273 274* Misc performance tweaks 275* Improved `Debug` implementation for `Bytes` 276* Avoid some incorrect assert panics 277 278# 0.4.1 (March 15, 2017) 279 280* Expose `buf` module and have most types available from there vs. root. 281* Implement `IntoBuf` for `T: Buf`. 282* Add `FromBuf` and `Buf::collect`. 283* Add iterator adapter for `Buf`. 284* Add scatter/gather support to `Buf` and `BufMut`. 285* Add `Buf::chain`. 286* Reduce allocations on repeated calls to `BytesMut::reserve`. 287* Implement `Debug` for more types. 288* Remove `Source` in favor of `IntoBuf`. 289* Implement `Extend` for `BytesMut`. 290 291 292# 0.4.0 (February 24, 2017) 293 294* Initial release 295