From ecf301d987ed944ef96f627757a0fc58608ff1bb Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Sun, 22 Mar 2020 14:59:38 +0100 Subject: [PATCH] document invariant of `VecDeque::as_(mut)_slice` --- src/liballoc/collections/vec_deque.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index 0ad59d2a20c..b9d91876db3 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -959,6 +959,9 @@ impl VecDeque { /// 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 @@ impl VecDeque { /// 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 /// /// ```