aboutsummaryrefslogtreecommitdiff
path: root/src/buf/buf_mut.rs
diff options
context:
space:
mode:
authorGravatar Dan Burkert <dan@danburkert.com> 2017-03-19 13:53:33 -0700
committerGravatar Carl Lerche <me@carllerche.com> 2017-03-19 13:53:33 -0700
commit4fe4e9429a9ad6ec51060c35a382b69651691f8d (patch)
tree855a160720c3df22fcc00d0c06ae30b8b05a1850 /src/buf/buf_mut.rs
parent9a4018e7571538c8cabb1cae0bde3f0d8949fde2 (diff)
downloadbytes-4fe4e9429a9ad6ec51060c35a382b69651691f8d.tar.gz
bytes-4fe4e9429a9ad6ec51060c35a382b69651691f8d.tar.zst
bytes-4fe4e9429a9ad6ec51060c35a382b69651691f8d.zip
Clarify BufMut::advance_mut docs (#78)
Also fixes an issue with a line wrap in the middle of an inline code block.
Diffstat (limited to '')
-rw-r--r--src/buf/buf_mut.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buf/buf_mut.rs b/src/buf/buf_mut.rs
index 8259ccf..848a30a 100644
--- a/src/buf/buf_mut.rs
+++ b/src/buf/buf_mut.rs
@@ -59,7 +59,7 @@ pub trait BufMut {
/// further into the underlying buffer.
///
/// 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
///
@@ -90,9 +90,9 @@ pub trait BufMut {
///
/// # Implementer notes
///
- /// It is recommended for implementations of `advance_mut` to panic if `cnt
- /// > self.remaining_mut()`. If the implementation does not panic, the call
- /// must behave as if `cnt == self.remaining_mut()`.
+ /// It is recommended for implementations of `advance_mut` to panic if
+ /// `cnt > self.remaining_mut()`. If the implementation does not panic,
+ /// the call must behave as if `cnt == self.remaining_mut()`.
///
/// A call with `cnt == 0` should never panic and be a no-op.
unsafe fn advance_mut(&mut self, cnt: usize);