Improve BytesMut::split suggestion (#699)

This commit is contained in:
Paolo Barbolini
2024-04-25 10:43:15 +02:00
committed by GitHub
parent baa5053572
commit a8806c2457
+1 -1
View File
@@ -349,7 +349,7 @@ impl BytesMut {
///
/// assert_eq!(other, b"hello world"[..]);
/// ```
#[must_use = "consider BytesMut::advance(len()) if you don't need the other half"]
#[must_use = "consider BytesMut::clear if you don't need the other half"]
pub fn split(&mut self) -> BytesMut {
let len = self.len();
self.split_to(len)