Skip to content

Commit 36ed3ea

Browse files
committed
fix docs
1 parent d0e252e commit 36ed3ea

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/dynamic/drain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use core::ptr::NonNull;
1414
/// A draining [iterator](std::iter::Iterator) that removes and returns elements from a
1515
/// `CircularBuffer`.
1616
///
17-
/// This struct is created by [`CircularBuffer::drain()`]. See its documentation for more details.
17+
/// This struct is created by [`CircularBufferAlloc::drain()`]. See its documentation for more details.
1818
pub struct Drain<'a, T> {
1919
/// This is a pointer and not a reference (`&'a mut CircularBuffer`) because using a reference
2020
/// would make `Drain` an invariant over `CircularBuffer`, but instead we want `Drain` to be

src/iter.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ fn slice_take_last_mut<'a, T>(slice: &mut &'a mut [T]) -> Option<&'a mut T> {
160160
///
161161
/// This struct is created by [`CircularBuffer::iter()`] and [`CircularBuffer::range()`]. See
162162
/// their documentation for more details.
163+
///
164+
/// [`CircularBuffer::iter()`]: crate::CircularBuffer::iter
165+
/// [`CircularBuffer::range()`]: crate::CircularBuffer::range
163166
pub struct Iter<'a, T> {
164167
pub(crate) right: &'a [T],
165168
pub(crate) left: &'a [T],
@@ -294,6 +297,9 @@ where
294297
///
295298
/// This struct is created by [`CircularBuffer::iter_mut()`] and [`CircularBuffer::range_mut()`].
296299
/// See their documentation for more details.
300+
///
301+
/// [`CircularBuffer::iter_mut()`]: crate::CircularBuffer::iter_mut
302+
/// [`CircularBuffer::range_mut()`]: crate::CircularBuffer::range_mut
297303
pub struct IterMut<'a, T> {
298304
right: &'a mut [T],
299305
left: &'a mut [T],

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ macro_rules! impl_buffer {
322322
/// Because it returns a mutable slice, any [slice methods](slice) may be called on the
323323
/// elements of the buffer, such as sorting methods.
324324
///
325-
/// Once the internal storage is contiguous, the [`as_slices()`](CircularBuffer::as_slices) and
326-
/// [`as_mut_slices()`](CircularBuffer::as_mut_slices) methods will return the entire contents
325+
/// Once the internal storage is contiguous, the [`as_slices()`](Self::as_slices) and
326+
/// [`as_mut_slices()`](Self::as_mut_slices) methods will return the entire contents
327327
/// of the deque in a single slice. Adding new elements to the buffer may make the buffer
328328
/// disjoint (not contiguous).
329329
///
@@ -796,7 +796,7 @@ macro_rules! impl_buffer {
796796
/// If the buffer is full, the element at the front of the buffer is automatically dropped and
797797
/// overwritten.
798798
///
799-
/// See also [`try_push_back()`](CircularBuffer::try_push_back) for a non-overwriting version
799+
/// See also [`try_push_back()`](Self::try_push_back) for a non-overwriting version
800800
/// of this method.
801801
///
802802
/// # Examples
@@ -1390,7 +1390,7 @@ macro_rules! impl_buffer {
13901390

13911391
/// Clones and appends all the elements from the slice to the back of the buffer.
13921392
///
1393-
/// This is an optimized version of [`extend()`](CircularBufferAlloc::extend) for slices.
1393+
/// This is an optimized version of [`extend()`](Self::extend) for slices.
13941394
///
13951395
/// If slice contains more values than the available capacity, the elements at the front of the
13961396
/// buffer are dropped.

0 commit comments

Comments
 (0)