Debian Codegraph @

.cargo/vendor/bytes/CHANGELOG.md

raw
1 # 1.11.1 (February 3rd, 2026)
2
3 - Fix integer overflow in `BytesMut::reserve`
4
5 # 1.11.0 (November 14th, 2025)
6
7 - Bump MSRV to 1.57 (#788)
8
9 ### Fixed
10
11 - fix: `BytesMut` only reuse if src has remaining (#803)
12 - Specialize `BytesMut::put::<Bytes>` (#793)
13 - Reserve capacity in `BytesMut::put` (#794)
14 - Change `BytesMut::remaining_mut` to use `isize::MAX` instead of `usize::MAX` (#795)
15
16 ### Internal changes
17
18 - Guarantee address in `slice()` for empty slices. (#780)
19 - Rename `Vtable::to_*` -> `Vtable::into_*` (#776)
20 - Fix latest clippy warnings (#787)
21 - Ignore `BytesMut::freeze` doctest on wasm (#790)
22 - Move `drop_fn` of `from_owner` into vtable (#801)
23
24 # 1.10.1 (March 5th, 2025)
25
26 ### Fixed
27
28 - Fix memory leak when using `to_vec` with `Bytes::from_owner` (#773)
29
30 # 1.10.0 (February 3rd, 2025)
31
32 ### Added
33
34 - Add feature to support platforms without atomic CAS (#467)
35 - `try_get_*` methods for `Buf` trait (#753)
36 - Implement `Buf::chunks_vectored` for `Take` (#617)
37 - Implement `Buf::chunks_vectored` for `VecDeque<u8>` (#708)
38
39 ### Fixed
40
41 - Remove incorrect guarantee for `chunks_vectored` (#754)
42 - Ensure that tests pass under `panic=abort` (#749)
43
44 # 1.9.0 (November 27, 2024)
45
46 ### Added
47
48 - Add `Bytes::from_owner` to enable externally-allocated memory (#742)
49
50 ### Documented
51
52 - Fix typo in Buf::chunk() comment (#744)
53
54 ### Internal changes
55
56 - Replace BufMut::put with BufMut::put_slice in Writer impl (#745)
57 - Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (#743)
58
59 # 1.8.0 (October 21, 2024)
60
61 - Guarantee address in `split_off`/`split_to` for empty slices (#740)
62
63 # 1.7.2 (September 17, 2024)
64
65 ### Fixed
66
67 - Fix default impl of `Buf::{get_int, get_int_le}` (#732)
68
69 ### Documented
70
71 - Fix double spaces in comments and doc comments (#731)
72
73 ### Internal changes
74
75 - Ensure BytesMut::advance reduces capacity (#728)
76
77 # 1.7.1 (August 1, 2024)
78
79 This release reverts the following change due to a regression:
80
81 - Reuse capacity when possible in `<BytesMut as Buf>::advance` impl (#698)
82
83 The revert can be found at #726.
84
85 # 1.7.0 (July 31, 2024)
86
87 ### Added
88
89 - Add conversion from `Bytes` to `BytesMut` (#695, #710)
90 - Add reclaim method without additional allocation (#686)
91
92 ### Documented
93
94 - Clarify how `BytesMut::zeroed` works (#714)
95 - Clarify the behavior of `Buf::chunk` (#717)
96
97 ### Changed
98
99 - Change length condition of `BytesMut::truncate`
100 - Reuse capacity when possible in `<BytesMut as Buf>::advance` impl (#698)
101 - Improve `must_use` suggestion of `BytesMut::split` (#699)
102
103 ### Internal changes
104
105 - Use `ManuallyDrop` instead of `mem::forget` (#678)
106 - Don't set `len` in `BytesMut::reserve` (#682)
107 - Optimize `Bytes::copy_to_bytes` (#688)
108 - Refactor `BytesMut::truncate` (#694)
109 - Refactor `BytesMut::resize` (#696)
110 - Reorder assertion in `Bytes::split_to`, `Bytes::split_off` (#689, #693)
111 - Use `offset_from` in more places (#705)
112 - Correct the wrong usage of `IntoIter` (#707)
113
114 # 1.6.1 (July 13, 2024)
115
116 This release fixes a bug where `Bytes::is_unique` returns incorrect values when
117 the `Bytes` originates from a shared `BytesMut`. (#718)
118
119 # 1.6.0 (March 22, 2024)
120
121 ### Added
122
123 - Add `Bytes::is_unique` (#643)
124
125 ### Documented
126
127 - Fix changelog typo (#628)
128 - Fix some spelling mistakes (#633)
129 - Typo fix (#637)
130 - Fix broken links (#639)
131 - Add security policy (#649)
132
133 ### Internal changes
134
135 - Move comment to correct constant (#629)
136 - Various cleanup (#635)
137 - Simplify `UninitSlice::as_uninit_slice_mut()` logic (#644)
138 - Use `self.` instead of `Self::` (#642)
139 - `BytesMut`: Assert alignment of `Shared` (#652)
140 - Remove unnecessary namespace qualifier (#660)
141 - Remove an unnecessary else branch (#662)
142 - Remove unreachable else branch (#661)
143 - make parameter mut in `From<Vec>` (#667)
144 - Restore commented tests (#665)
145 - Use `sub` instead of `offset` (#668)
146 - Calculate original capacity only if necessary (#666)
147 - `set_vec_pos` does not need a second parameter (#672)
148 - `get_vec_pos`: use `&self` instead of `&mut self` (#670)
149 - Refactor `split_at`/`split_to` (#663)
150 - Use `Iterator` from the prelude (#673)
151 - `copy_to_bytes`: Add panic section to docs (#676)
152 - Remove redundant reserve call (#674)
153 - Use `ManuallyDrop` instead of `mem::forget` (#675)
154
155
156 # 1.5.0 (September 7, 2023)
157
158 ### Added
159
160 - Add `UninitSlice::{new,uninit}` (#598, #599)
161 - Implement `BufMut` for `&mut [MaybeUninit<u8>]` (#597)
162
163 ### Changed
164
165 - Mark `BytesMut::extend_from_slice` as inline (#595)
166
167 # 1.4.0 (January 31, 2023)
168
169 ### Added
170
171 - Make `IntoIter` constructor public (#581)
172
173 ### Fixed
174
175 - Avoid large reallocations when freezing `BytesMut` (#592)
176
177 ### Documented
178
179 - Document which functions require `std` (#591)
180 - Fix duplicate "the the" typos (#585)
181
182 # 1.3.0 (November 20, 2022)
183
184 ### Added
185
186 - Rename and expose `BytesMut::spare_capacity_mut` (#572)
187 - Implement native-endian get and put functions for `Buf` and `BufMut` (#576)
188
189 ### Fixed
190
191 - Don't have important data in unused capacity when calling reserve (#563)
192
193 ### Documented
194
195 - `Bytes::new` etc should return `Self` not `Bytes` (#568)
196
197 # 1.2.1 (July 30, 2022)
198
199 ### Fixed
200
201 - Fix unbounded memory growth when using `reserve` (#560)
202
203 # 1.2.0 (July 19, 2022)
204
205 ### Added
206
207 - Add `BytesMut::zeroed` (#517)
208 - Implement `Extend<Bytes>` for `BytesMut` (#527)
209 - Add conversion from `BytesMut` to `Vec<u8>` (#543, #554)
210 - Add conversion from `Bytes` to `Vec<u8>` (#547)
211 - Add `UninitSlice::as_uninit_slice_mut()` (#548)
212 - Add const to `Bytes::{len,is_empty}` (#514)
213
214 ### Changed
215
216 - Reuse vector in `BytesMut::reserve` (#539, #544)
217
218 ### Fixed
219
220 - Make miri happy (#515, #523, #542, #545, #553)
221 - Make tsan happy (#541)
222 - Fix `remaining_mut()` on chain (#488)
223 - Fix amortized asymptotics of `BytesMut` (#555)
224
225 ### Documented
226
227 - Redraw layout diagram with box drawing characters (#539)
228 - Clarify `BytesMut::unsplit` docs (#535)
229
230 # 1.1.0 (August 25, 2021)
231
232 ### Added
233
234 - `BufMut::put_bytes(self, val, cnt)` (#487)
235 - Implement `From<Box<[u8]>>` for `Bytes` (#504)
236
237 ### Changed
238
239 - Override `put_slice` for `&mut [u8]` (#483)
240 - Panic on integer overflow in `Chain::remaining` (#482)
241 - Add inline tags to `UninitSlice` methods (#443)
242 - Override `copy_to_bytes` for Chain and Take (#481)
243 - Keep capacity when unsplit on empty other buf (#502)
244
245 ### Documented
246
247 - Clarify `BufMut` allocation guarantees (#501)
248 - Clarify `BufMut::put_int` behavior (#486)
249 - Clarify actions of `clear` and `truncate`. (#508)
250
251 # 1.0.1 (January 11, 2021)
252
253 ### Changed
254 - mark `Vec::put_slice` with `#[inline]` (#459)
255
256 ### Fixed
257 - Fix deprecation warning (#457)
258 - use `Box::into_raw` instead of `mem::forget`-in-disguise (#458)
259
260 # 1.0.0 (December 22, 2020)
261
262 ### Changed
263 - Rename `Buf`/`BufMut` methods `bytes()` and `bytes_mut()` to `chunk()` and `chunk_mut()` (#450)
264
265 ### Removed
266 - remove unused Buf implementation. (#449)
267
268 # 0.6.0 (October 21, 2020)
269
270 API polish in preparation for a 1.0 release.
271
272 ### Changed
273 - `BufMut` is now an `unsafe` trait (#432).
274 - `BufMut::bytes_mut()` returns `&mut UninitSlice`, a type owned by `bytes` to
275 avoid undefined behavior (#433).
276 - `Buf::copy_to_bytes(len)` replaces `Buf::into_bytes()` (#439).
277 - `Buf`/`BufMut` utility methods are moved onto the trait and `*Ext` traits are
278 removed (#431).
279
280 ### Removed
281 - `BufMut::bytes_vectored_mut()` (#430).
282 - `new` methods on combinator types (#434).
283
284 # 0.5.6 (July 13, 2020)
285
286 - Improve `BytesMut` to reuse buffer when fully `advance`d.
287 - Mark `BytesMut::{as_mut, set_len}` with `#[inline]`.
288 - Relax synchronization when cloning in shared vtable of `Bytes`.
289 - Move `loom` to `dev-dependencies`.
290
291 # 0.5.5 (June 18, 2020)
292
293 ### Added
294 - Allow using the `serde` feature in `no_std` environments (#385).
295
296 ### Fix
297 - Fix `BufMut::advance_mut` to panic if advanced passed the capacity (#354)..
298 - Fix `BytesMut::freeze` ignoring amount previously `advance`d (#352).
299
300 # 0.5.4 (January 23, 2020)
301
302 ### Added
303 - Make `Bytes::new` a `const fn`.
304 - Add `From<BytesMut>` for `Bytes`.
305
306 ### Fix
307 - Fix reversed arguments in `PartialOrd` for `Bytes`.
308 - Fix `Bytes::truncate` losing original capacity when repr is an unshared `Vec`.
309 - Fix `Bytes::from(Vec)` when allocator gave `Vec` a pointer with LSB set.
310 - Fix panic in `Bytes::slice_ref` if argument is an empty slice.
311
312 # 0.5.3 (December 12, 2019)
313
314 ### Added
315 - `must_use` attributes to `split`, `split_off`, and `split_to` methods (#337).
316
317 ### Fix
318 - Potential freeing of a null pointer in `Bytes` when constructed with an empty `Vec<u8>` (#341, #342).
319 - Calling `Bytes::truncate` with a size large than the length will no longer clear the `Bytes` (#333).
320
321 # 0.5.2 (November 27, 2019)
322
323 ### Added
324 - `Limit` methods `into_inner`, `get_ref`, `get_mut`, `limit`, and `set_limit` (#325).
325
326 # 0.5.1 (November 25, 2019)
327
328 ### Fix
329 - Growth documentation for `BytesMut` (#321)
330
331 # 0.5.0 (November 25, 2019)
332
333 ### Fix
334 - Potential overflow in `copy_to_slice`
335
336 ### Changed
337 - Increased minimum supported Rust version to 1.39.
338 - `Bytes` is now a "trait object", allowing for custom allocation strategies (#298)
339 - `BytesMut` implicitly grows internal storage. `remaining_mut()` returns
340 `usize::MAX` (#316).
341 - `BufMut::bytes_mut` returns `&mut [MaybeUninit<u8>]` to reflect the unknown
342 initialization state (#305).
343 - `Buf` / `BufMut` implementations for `&[u8]` and `&mut [u8]`
344 respectively (#261).
345 - Move `Buf` / `BufMut` "extra" functions to an extension trait (#306).
346 - `BufMutExt::limit` (#309).
347 - `Bytes::slice` takes a `RangeBounds` argument (#265).
348 - `Bytes::from_static` is now a `const fn` (#311).
349 - A multitude of smaller performance optimizations.
350
351 ### Added
352 - `no_std` support (#281).
353 - `get_*`, `put_*`, `get_*_le`, and `put_*le` accessors for handling byte order.
354 - `BorrowMut` implementation for `BytesMut` (#185).
355
356 ### Removed
357 - `IntoBuf` (#288).
358 - `Buf` implementation for `&str` (#301).
359 - `byteorder` dependency (#280).
360 - `iovec` dependency, use `std::IoSlice` instead (#263).
361 - optional `either` dependency (#315).
362 - optional `i128` feature -- now available on stable. (#276).
363
364 # 0.4.12 (March 6, 2019)
365
366 ### Added
367 - Implement `FromIterator<&'a u8>` for `BytesMut`/`Bytes` (#244).
368 - Implement `Buf` for `VecDeque` (#249).
369
370 # 0.4.11 (November 17, 2018)
371
372 * Use raw pointers for potentially racy loads (#233).
373 * Implement `BufRead` for `buf::Reader` (#232).
374 * Documentation tweaks (#234).
375
376 # 0.4.10 (September 4, 2018)
377
378 * impl `Buf` and `BufMut` for `Either` (#225).
379 * Add `Bytes::slice_ref` (#208).
380
381 # 0.4.9 (July 12, 2018)
382
383 * Add 128 bit number support behind a feature flag (#209).
384 * Implement `IntoBuf` for `&mut [u8]`
385
386 # 0.4.8 (May 25, 2018)
387
388 * Fix panic in `BytesMut` `FromIterator` implementation.
389 * Bytes: Recycle space when reserving space in vec mode (#197).
390 * Bytes: Add resize fn (#203).
391
392 # 0.4.7 (April 27, 2018)
393
394 * Make `Buf` and `BufMut` usable as trait objects (#186).
395 * impl BorrowMut for BytesMut (#185).
396 * Improve accessor performance (#195).
397
398 # 0.4.6 (Janary 8, 2018)
399
400 * Implement FromIterator for Bytes/BytesMut (#148).
401 * Add `advance` fn to Bytes/BytesMut (#166).
402 * Add `unsplit` fn to `BytesMut` (#162, #173).
403 * Improvements to Bytes split fns (#92).
404
405 # 0.4.5 (August 12, 2017)
406
407 * Fix range bug in `Take::bytes`
408 * Misc performance improvements
409 * Add extra `PartialEq` implementations.
410 * Add `Bytes::with_capacity`
411 * Implement `AsMut[u8]` for `BytesMut`
412
413 # 0.4.4 (May 26, 2017)
414
415 * Add serde support behind feature flag
416 * Add `extend_from_slice` on `Bytes` and `BytesMut`
417 * Add `truncate` and `clear` on `Bytes`
418 * Misc additional std trait implementations
419 * Misc performance improvements
420
421 # 0.4.3 (April 30, 2017)
422
423 * Fix Vec::advance_mut bug
424 * Bump minimum Rust version to 1.15
425 * Misc performance tweaks
426
427 # 0.4.2 (April 5, 2017)
428
429 * Misc performance tweaks
430 * Improved `Debug` implementation for `Bytes`
431 * Avoid some incorrect assert panics
432
433 # 0.4.1 (March 15, 2017)
434
435 * Expose `buf` module and have most types available from there vs. root.
436 * Implement `IntoBuf` for `T: Buf`.
437 * Add `FromBuf` and `Buf::collect`.
438 * Add iterator adapter for `Buf`.
439 * Add scatter/gather support to `Buf` and `BufMut`.
440 * Add `Buf::chain`.
441 * Reduce allocations on repeated calls to `BytesMut::reserve`.
442 * Implement `Debug` for more types.
443 * Remove `Source` in favor of `IntoBuf`.
444 * Implement `Extend` for `BytesMut`.
445
446
447 # 0.4.0 (February 24, 2017)
448
449 * Initial release