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