From 7212c9cf63b264356a1259e4e6027179d19af61a Mon Sep 17 00:00:00 2001 From: michael88888888 Date: Sat, 31 Aug 2024 19:23:00 +0800 Subject: [PATCH] Example does not match "IntoIter::new" --- src/buf/iter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buf/iter.rs b/src/buf/iter.rs index 74f9b991e..184d88f5f 100644 --- a/src/buf/iter.rs +++ b/src/buf/iter.rs @@ -28,10 +28,10 @@ impl IntoIter { /// # Examples /// /// ``` - /// use bytes::Bytes; + /// use bytes::{buf::IntoIter, Bytes}; /// /// let buf = Bytes::from_static(b"abc"); - /// let mut iter = buf.into_iter(); + /// let mut iter = IntoIter::new(buf); /// /// assert_eq!(iter.next(), Some(b'a')); /// assert_eq!(iter.next(), Some(b'b'));