aboutsummaryrefslogtreecommitdiff
path: root/src/buf
diff options
context:
space:
mode:
Diffstat (limited to 'src/buf')
-rw-r--r--src/buf/buf_impl.rs2
-rw-r--r--src/buf/buf_mut.rs1
-rw-r--r--src/buf/iter.rs4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/buf/buf_impl.rs b/src/buf/buf_impl.rs
index d903d5c..366cfc9 100644
--- a/src/buf/buf_impl.rs
+++ b/src/buf/buf_impl.rs
@@ -160,6 +160,7 @@ pub trait Buf {
///
/// [`writev`]: http://man7.org/linux/man-pages/man2/readv.2.html
#[cfg(feature = "std")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
if dst.is_empty() {
return 0;
@@ -1183,6 +1184,7 @@ pub trait Buf {
/// assert_eq!(&dst[..11], &b"hello world"[..]);
/// ```
#[cfg(feature = "std")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
fn reader(self) -> Reader<Self>
where
Self: Sized,
diff --git a/src/buf/buf_mut.rs b/src/buf/buf_mut.rs
index ada07a3..685fcc7 100644
--- a/src/buf/buf_mut.rs
+++ b/src/buf/buf_mut.rs
@@ -1239,6 +1239,7 @@ pub unsafe trait BufMut {
/// assert_eq!(*buf, b"hello world"[..]);
/// ```
#[cfg(feature = "std")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
fn writer(self) -> Writer<Self>
where
Self: Sized,
diff --git a/src/buf/iter.rs b/src/buf/iter.rs
index 8914a40..c694e3d 100644
--- a/src/buf/iter.rs
+++ b/src/buf/iter.rs
@@ -2,8 +2,6 @@ use crate::Buf;
/// Iterator over the bytes contained by the buffer.
///
-/// This struct is created by the [`iter`] method on [`Buf`].
-///
/// # Examples
///
/// Basic usage:
@@ -43,7 +41,7 @@ impl<T> IntoIter<T> {
/// assert_eq!(iter.next(), Some(b'c'));
/// assert_eq!(iter.next(), None);
/// ```
- pub(crate) fn new(inner: T) -> IntoIter<T> {
+ pub fn new(inner: T) -> IntoIter<T> {
IntoIter { inner }
}