Rollup merge of #65574 - tshepang:linked-list-disclaimer, r=Centril
docs: improve disclaimer regarding LinkedList
This commit is contained in:
commit
5831e0643e
@ -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>>>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user