Skip to content

Commit ecf301d

Browse files
committed
document invariant of VecDeque::as_(mut)_slice
1 parent 626fdbc commit ecf301d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/liballoc/collections/vec_deque.rs

+6
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,9 @@ impl<T> VecDeque<T> {
959959
/// Returns a pair of slices which contain, in order, the contents of the
960960
/// `VecDeque`.
961961
///
962+
/// In case [`make_contiguous`](#method.make_contiguous) was previously called,
963+
/// all elements of the deque are in the first slice and the second slice is empty.
964+
///
962965
/// # Examples
963966
///
964967
/// ```
@@ -989,6 +992,9 @@ impl<T> VecDeque<T> {
989992
/// Returns a pair of slices which contain, in order, the contents of the
990993
/// `VecDeque`.
991994
///
995+
/// In case [`make_contiguous`](#method.make_contiguous) was previously called,
996+
/// all elements of the deque are in the first slice and the second slice is empty.
997+
///
992998
/// # Examples
993999
///
9941000
/// ```

0 commit comments

Comments
 (0)