diff options
Diffstat (limited to 'src/bytes_mut.rs')
-rw-r--r-- | src/bytes_mut.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytes_mut.rs b/src/bytes_mut.rs index c5642cf..6777929 100644 --- a/src/bytes_mut.rs +++ b/src/bytes_mut.rs @@ -38,7 +38,7 @@ use crate::loom::sync::atomic::{self, AtomicPtr, AtomicUsize, Ordering}; /// /// buf.put_u8(b'h'); /// buf.put_u8(b'e'); -/// buf.put("llo"); +/// buf.put(&b"llo"[..]); /// /// assert_eq!(&buf[..], b"hello"); /// @@ -219,7 +219,7 @@ impl BytesMut { /// use std::thread; /// /// let mut b = BytesMut::with_capacity(64); - /// b.put("hello world"); + /// b.put(&b"hello world"[..]); /// let b1 = b.freeze(); /// let b2 = b1.clone(); /// |