diff options
| author | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2019-10-31 14:02:38 +0200 |
|---|---|---|
| committer | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2019-10-31 14:02:38 +0200 |
| commit | a844e59d2b9a1271576a3ee043f3a634b63cc16b (patch) | |
| tree | 8eb1b51ecf48a7517667b7c6fbb08b6d33131b30 /src/liballoc | |
| parent | b3a0350c2bf5d93cb734257bbddc8300bef4b851 (diff) | |
| download | rust-a844e59d2b9a1271576a3ee043f3a634b63cc16b.tar.gz rust-a844e59d2b9a1271576a3ee043f3a634b63cc16b.zip | |
docs: improve disclaimer regarding LinkedList
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/linked_list.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 702df250999..48f9865b870 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<T> { head: Option<NonNull<Node<T>>>, |
