From a8806c245700e583134e67b7e0b87f1256b95bfa Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Thu, 25 Apr 2024 10:43:15 +0200 Subject: [PATCH] Improve BytesMut::split suggestion (#699) --- src/bytes_mut.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bytes_mut.rs b/src/bytes_mut.rs index 35e19005a..75762996a 100644 --- a/src/bytes_mut.rs +++ b/src/bytes_mut.rs @@ -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)