make IntoIter constructor public (#581)

This commit is contained in:
Matthijs van Otterdijk
2022-11-25 22:48:20 +01:00
committed by GitHub
parent 9b227220df
commit 050d65b2ce
+1 -3
View File
@@ -2,8 +2,6 @@ use crate::Buf;
/// Iterator over the bytes contained by the buffer. /// Iterator over the bytes contained by the buffer.
/// ///
/// This struct is created by the [`iter`] method on [`Buf`].
///
/// # Examples /// # Examples
/// ///
/// Basic usage: /// Basic usage:
@@ -43,7 +41,7 @@ impl<T> IntoIter<T> {
/// assert_eq!(iter.next(), Some(b'c')); /// assert_eq!(iter.next(), Some(b'c'));
/// assert_eq!(iter.next(), None); /// assert_eq!(iter.next(), None);
/// ``` /// ```
pub(crate) fn new(inner: T) -> IntoIter<T> { pub fn new(inner: T) -> IntoIter<T> {
IntoIter { inner } IntoIter { inner }
} }