diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2023-02-15 19:31:55 +0100 |
---|---|---|
committer | Jeff Vander Stoep <jeffv@google.com> | 2023-02-15 19:31:55 +0100 |
commit | 07286a835f57d6d4f55e79ecbc62fcaa12d54e50 (patch) | |
tree | 3efb3fc7a75820446adc84e3eed6a22c9a300322 /src/buf | |
parent | 5309249612fab0f62ebb1ec133ac7ba796d8b5e3 (diff) | |
download | bytes-07286a835f57d6d4f55e79ecbc62fcaa12d54e50.tar.gz |
Upgrade bytes to 1.4.0
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update rust/crates/bytes
For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
Test: TreeHugger
Change-Id: I3c895d5bfc3a552a69de22f9d904adbd00e4aeee
Diffstat (limited to 'src/buf')
-rw-r--r-- | src/buf/buf_impl.rs | 2 | ||||
-rw-r--r-- | src/buf/buf_mut.rs | 1 | ||||
-rw-r--r-- | src/buf/iter.rs | 4 |
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 } } |