Skip to content

Commit a844e59

Browse files
committed
docs: improve disclaimer regarding LinkedList
1 parent b3a0350 commit a844e59

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/liballoc/collections/linked_list.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
//! The `LinkedList` allows pushing and popping elements at either end
44
//! in constant time.
55
//!
6-
//! Almost always it is better to use `Vec` or [`VecDeque`] instead of
7-
//! [`LinkedList`]. In general, array-based containers are faster,
8-
//! more memory efficient and make better use of CPU cache.
6+
//! NOTE: It is almost always better to use [`Vec`] or [`VecDeque`] because
7+
//! array-based containers are generally faster,
8+
//! more memory efficient, and make better use of CPU cache.
99
//!
10-
//! [`LinkedList`]: ../linked_list/struct.LinkedList.html
10+
//! [`Vec`]: ../../vec/struct.Vec.html
1111
//! [`VecDeque`]: ../vec_deque/struct.VecDeque.html
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
@@ -31,9 +31,9 @@ mod tests;
3131
/// The `LinkedList` allows pushing and popping elements at either end
3232
/// in constant time.
3333
///
34-
/// Almost always it is better to use `Vec` or `VecDeque` instead of
35-
/// `LinkedList`. In general, array-based containers are faster,
36-
/// more memory efficient and make better use of CPU cache.
34+
/// NOTE: It is almost always better to use `Vec` or `VecDeque` because
35+
/// array-based containers are generally faster,
36+
/// more memory efficient, and make better use of CPU cache.
3737
#[stable(feature = "rust1", since = "1.0.0")]
3838
pub struct LinkedList<T> {
3939
head: Option<NonNull<Node<T>>>,

0 commit comments

Comments
 (0)