Skip to content

Commit

Permalink
Improve BytesMut::split suggestion (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini committed Apr 25, 2024
1 parent baa5053 commit a8806c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bytes_mut.rs
Expand Up @@ -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)
Expand Down

0 comments on commit a8806c2

Please sign in to comment.