3
3
//! The `LinkedList` allows pushing and popping elements at either end
4
4
//! in constant time.
5
5
//!
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.
9
9
//!
10
- //! [`LinkedList `]: ../linked_list/ struct.LinkedList .html
10
+ //! [`Vec `]: ../../vec/ struct.Vec .html
11
11
//! [`VecDeque`]: ../vec_deque/struct.VecDeque.html
12
12
13
13
#![ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -31,9 +31,9 @@ mod tests;
31
31
/// The `LinkedList` allows pushing and popping elements at either end
32
32
/// in constant time.
33
33
///
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.
37
37
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
38
38
pub struct LinkedList < T > {
39
39
head : Option < NonNull < Node < T > > > ,
0 commit comments