Debian Codegraph @

CHANGELOG.md

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