mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-13 00:00:32 +02:00
Make bytes_mut -> chunk_mut rename more easily discoverable (#471)
This commit is contained in:
@@ -127,6 +127,9 @@ pub trait Buf {
|
||||
/// This function should never panic. Once the end of the buffer is reached,
|
||||
/// i.e., `Buf::remaining` returns 0, calls to `chunk()` should return an
|
||||
/// empty slice.
|
||||
// The `chunk` method was previously called `bytes`. This alias makes the rename
|
||||
// more easily discoverable.
|
||||
#[cfg_attr(docsrs, doc(alias = "bytes"))]
|
||||
fn chunk(&self) -> &[u8];
|
||||
|
||||
/// Fills `dst` with potentially multiple slices starting at `self`'s
|
||||
|
||||
Reference in New Issue
Block a user