We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e9fa0b commit 55e2968Copy full SHA for 55e2968
src/bytes_mut.rs
@@ -380,6 +380,8 @@ impl BytesMut {
380
/// If `len` is greater than the buffer's current length, this has no
381
/// effect.
382
///
383
+ /// Existing underlying capacity is preserved.
384
+ ///
385
/// The [`split_off`] method can emulate `truncate`, but this causes the
386
/// excess bytes to be returned instead of dropped.
387
@@ -402,7 +404,7 @@ impl BytesMut {
402
404
}
403
405
406
- /// Clears the buffer, removing all data.
407
+ /// Clears the buffer, removing all data. Existing capacity is preserved.
408
409
/// # Examples
410
0 commit comments