mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-25 00:00:22 +02:00
Clarify BufMut::advance_mut docs (#78)
Also fixes an issue with a line wrap in the middle of an inline code block.
This commit is contained in:
+4
-4
@@ -59,7 +59,7 @@ pub trait BufMut {
|
|||||||
/// further into the underlying buffer.
|
/// further into the underlying buffer.
|
||||||
///
|
///
|
||||||
/// This function is unsafe because there is no guarantee that the bytes
|
/// This function is unsafe because there is no guarantee that the bytes
|
||||||
/// being advanced to have been initialized.
|
/// being advanced past have been initialized.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
@@ -90,9 +90,9 @@ pub trait BufMut {
|
|||||||
///
|
///
|
||||||
/// # Implementer notes
|
/// # Implementer notes
|
||||||
///
|
///
|
||||||
/// It is recommended for implementations of `advance_mut` to panic if `cnt
|
/// It is recommended for implementations of `advance_mut` to panic if
|
||||||
/// > self.remaining_mut()`. If the implementation does not panic, the call
|
/// `cnt > self.remaining_mut()`. If the implementation does not panic,
|
||||||
/// must behave as if `cnt == self.remaining_mut()`.
|
/// the call must behave as if `cnt == self.remaining_mut()`.
|
||||||
///
|
///
|
||||||
/// A call with `cnt == 0` should never panic and be a no-op.
|
/// A call with `cnt == 0` should never panic and be a no-op.
|
||||||
unsafe fn advance_mut(&mut self, cnt: usize);
|
unsafe fn advance_mut(&mut self, cnt: usize);
|
||||||
|
|||||||
Reference in New Issue
Block a user