File tree Expand file tree Collapse file tree 5 files changed +12
-1
lines changed
Expand file tree Collapse file tree 5 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,8 @@ jobs:
160160 run : rustup update stable && rustup default stable
161161 - name : Build documentation
162162 run : cargo doc --no-deps --all-features
163+ env :
164+ RUSTDOCFLAGS : --cfg docsrs
163165 - name : Publish documentation
164166 run : |
165167 cd target/doc
Original file line number Diff line number Diff line change 1010# 1.0.0 (December 22, 2020)
1111
1212### Changed
13- - Rename Buf/ BufMut, methods to chunk/ chunk_mut (#450 )
13+ - Rename ` Buf ` / ` BufMut ` methods ` bytes() ` and ` bytes_mut() ` to ` chunk() ` and ` chunk_mut() ` (#450 )
1414
1515### Removed
1616- remove unused Buf implementation. (#449 )
Original file line number Diff line number Diff line change @@ -32,3 +32,6 @@ serde_test = "1.0"
3232
3333[target .'cfg(loom)' .dev-dependencies ]
3434loom = " 0.4"
35+
36+ [package .metadata .docs .rs ]
37+ rustdoc-args = [" --cfg" , " docsrs" ]
Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ pub trait Buf {
127127 /// This function should never panic. Once the end of the buffer is reached,
128128 /// i.e., `Buf::remaining` returns 0, calls to `chunk()` should return an
129129 /// empty slice.
130+ // The `chunk` method was previously called `bytes`. This alias makes the rename
131+ // more easily discoverable.
132+ #[ cfg_attr( docsrs, doc( alias = "bytes" ) ) ]
130133 fn chunk ( & self ) -> & [ u8 ] ;
131134
132135 /// Fills `dst` with potentially multiple slices starting at `self`'s
Original file line number Diff line number Diff line change @@ -158,6 +158,9 @@ pub unsafe trait BufMut {
158158 /// `chunk_mut()` returning an empty slice implies that `remaining_mut()` will
159159 /// return 0 and `remaining_mut()` returning 0 implies that `chunk_mut()` will
160160 /// return an empty slice.
161+ // The `chunk_mut` method was previously called `bytes_mut`. This alias makes the
162+ // rename more easily discoverable.
163+ #[ cfg_attr( docsrs, doc( alias = "bytes_mut" ) ) ]
161164 fn chunk_mut ( & mut self ) -> & mut UninitSlice ;
162165
163166 /// Transfer bytes into `self` from `src` and advance the cursor by the
You can’t perform that action at this time.
0 commit comments