aboutsummaryrefslogtreecommitdiff
path: root/src/bytes_mut.rs
diff options
context:
space:
mode:
authorGravatar Gabriel Goller <gabrielgoller123@gmail.com> 2023-11-16 12:24:21 +0100
committerGravatar GitHub <noreply@github.com> 2023-11-16 06:24:21 -0500
commit72cbb92e0e53680c67c27b56fabbe1f3ed5dbae9 (patch)
tree3973e0862571346f83ee1bce657a784b1d50d56f /src/bytes_mut.rs
parentbde8c50703869f54b905560eb62c2478a0111885 (diff)
downloadbytes-72cbb92e0e53680c67c27b56fabbe1f3ed5dbae9.tar.gz
bytes-72cbb92e0e53680c67c27b56fabbe1f3ed5dbae9.tar.zst
bytes-72cbb92e0e53680c67c27b56fabbe1f3ed5dbae9.zip
docs: fix broken links (#639)
Fixed a few broken links and converted a lot of them from the html-link to intra-doc links.
Diffstat (limited to 'src/bytes_mut.rs')
-rw-r--r--src/bytes_mut.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bytes_mut.rs b/src/bytes_mut.rs
index c860720..57fd33e 100644
--- a/src/bytes_mut.rs
+++ b/src/bytes_mut.rs
@@ -399,7 +399,7 @@ impl BytesMut {
///
/// Existing underlying capacity is preserved.
///
- /// The [`split_off`] method can emulate `truncate`, but this causes the
+ /// The [split_off](`Self::split_off()`) method can emulate `truncate`, but this causes the
/// excess bytes to be returned instead of dropped.
///
/// # Examples
@@ -411,8 +411,6 @@ impl BytesMut {
/// buf.truncate(5);
/// assert_eq!(buf, b"hello"[..]);
/// ```
- ///
- /// [`split_off`]: #method.split_off
pub fn truncate(&mut self, len: usize) {
if len <= self.len() {
unsafe {