mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-26 00:00:20 +02:00
make IntoIter constructor public (#581)
This commit is contained in:
+1
-3
@@ -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 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user