From a844e59d2b9a1271576a3ee043f3a634b63cc16b Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 31 Oct 2019 14:02:38 +0200 Subject: [PATCH] docs: improve disclaimer regarding LinkedList --- src/liballoc/collections/linked_list.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 702df250999fb..48f9865b87036 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -3,11 +3,11 @@ //! The `LinkedList` allows pushing and popping elements at either end //! in constant time. //! -//! Almost always it is better to use `Vec` or [`VecDeque`] instead of -//! [`LinkedList`]. In general, array-based containers are faster, -//! more memory efficient and make better use of CPU cache. +//! NOTE: It is almost always better to use [`Vec`] or [`VecDeque`] because +//! array-based containers are generally faster, +//! more memory efficient, and make better use of CPU cache. //! -//! [`LinkedList`]: ../linked_list/struct.LinkedList.html +//! [`Vec`]: ../../vec/struct.Vec.html //! [`VecDeque`]: ../vec_deque/struct.VecDeque.html #![stable(feature = "rust1", since = "1.0.0")] @@ -31,9 +31,9 @@ mod tests; /// The `LinkedList` allows pushing and popping elements at either end /// in constant time. /// -/// Almost always it is better to use `Vec` or `VecDeque` instead of -/// `LinkedList`. In general, array-based containers are faster, -/// more memory efficient and make better use of CPU cache. +/// NOTE: It is almost always better to use `Vec` or `VecDeque` because +/// array-based containers are generally faster, +/// more memory efficient, and make better use of CPU cache. #[stable(feature = "rust1", since = "1.0.0")] pub struct LinkedList { head: Option>>,