]> git.lizzy.rs Git - rust.git/commitdiff
document invariant of `VecDeque::as_(mut)_slice`
authorBastian Kauschke <bastian_kauschke@hotmail.de>
Sun, 22 Mar 2020 13:59:38 +0000 (14:59 +0100)
committerBastian Kauschke <bastian_kauschke@hotmail.de>
Sun, 22 Mar 2020 13:59:38 +0000 (14:59 +0100)
src/liballoc/collections/vec_deque.rs

index 0ad59d2a20c2e127c9e496098e59e785dfda0155..b9d91876db323803782d1364023b09c2c651bd78 100644 (file)
@@ -959,6 +959,9 @@ pub fn iter_mut(&mut self) -> IterMut<'_, T> {
     /// Returns a pair of slices which contain, in order, the contents of the
     /// `VecDeque`.
     ///
+    /// In case [`make_contiguous`](#method.make_contiguous) was previously called,
+    /// all elements of the deque are in the first slice and the second slice is empty.
+    ///
     /// # Examples
     ///
     /// ```
@@ -989,6 +992,9 @@ pub fn as_slices(&self) -> (&[T], &[T]) {
     /// Returns a pair of slices which contain, in order, the contents of the
     /// `VecDeque`.
     ///
+    /// In case [`make_contiguous`](#method.make_contiguous) was previously called,
+    /// all elements of the deque are in the first slice and the second slice is empty.
+    ///
     /// # Examples
     ///
     /// ```