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:
160
160
run : rustup update stable && rustup default stable
161
161
- name : Build documentation
162
162
run : cargo doc --no-deps --all-features
163
+ env :
164
+ RUSTDOCFLAGS : --cfg docsrs
163
165
- name : Publish documentation
164
166
run : |
165
167
cd target/doc
Original file line number Diff line number Diff line change 10
10
# 1.0.0 (December 22, 2020)
11
11
12
12
### 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 )
14
14
15
15
### Removed
16
16
- remove unused Buf implementation. (#449 )
Original file line number Diff line number Diff line change @@ -32,3 +32,6 @@ serde_test = "1.0"
32
32
33
33
[target .'cfg(loom)' .dev-dependencies ]
34
34
loom = " 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 {
127
127
/// This function should never panic. Once the end of the buffer is reached,
128
128
/// i.e., `Buf::remaining` returns 0, calls to `chunk()` should return an
129
129
/// 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" ) ) ]
130
133
fn chunk ( & self ) -> & [ u8 ] ;
131
134
132
135
/// 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 {
158
158
/// `chunk_mut()` returning an empty slice implies that `remaining_mut()` will
159
159
/// return 0 and `remaining_mut()` returning 0 implies that `chunk_mut()` will
160
160
/// 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" ) ) ]
161
164
fn chunk_mut ( & mut self ) -> & mut UninitSlice ;
162
165
163
166
/// Transfer bytes into `self` from `src` and advance the cursor by the
You can’t perform that action at this time.
0 commit comments