diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-07 17:27:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-07 17:27:32 +0100 |
| commit | 10f999b72d24fa181a3ec54fd21807b6a664e615 (patch) | |
| tree | 17a54913e18979912f3e0297f61acaa193ba24e6 /src/liballoc | |
| parent | e6d4996a436497a0344eaba80615e3643389b89b (diff) | |
| parent | 4c2b0f1631f40f7dce7292b3b3b4e2a752b82f7f (diff) | |
| download | rust-10f999b72d24fa181a3ec54fd21807b6a664e615.tar.gz rust-10f999b72d24fa181a3ec54fd21807b6a664e615.zip | |
Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkov
fix various typos
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/btree/node.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/collections/linked_list.rs | 6 | ||||
| -rw-r--r-- | src/liballoc/collections/vec_deque.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/vec.rs | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index 362755f8b7f..edeb87a908d 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -306,7 +306,7 @@ impl<K, V> Root<K, V> { /// `NodeRef` could be pointing to either type of node. /// Note that in case of a leaf node, this might still be the shared root! /// Only turn this into a `LeafNode` reference if you know it is not the shared root! -/// Shared references must be dereferencable *for the entire size of their pointee*, +/// Shared references must be dereferenceable *for the entire size of their pointee*, /// so '&LeafNode` or `&InternalNode` pointing to the shared root is undefined behavior. /// Turning this into a `NodeHeader` reference is always safe. pub struct NodeRef<BorrowType, K, V, Type> { diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 8efacf108fc..73ae267ddab 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -841,10 +841,10 @@ impl<T> LinkedList<T> { /// d.push_front(2); /// d.push_front(3); /// - /// let mut splitted = d.split_off(2); + /// let mut split = d.split_off(2); /// - /// assert_eq!(splitted.pop_front(), Some(1)); - /// assert_eq!(splitted.pop_front(), None); + /// assert_eq!(split.pop_front(), Some(1)); + /// assert_eq!(split.pop_front(), None); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn split_off(&mut self, at: usize) -> LinkedList<T> { diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index 85d1d98b8a9..9d56f17700a 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -2132,7 +2132,7 @@ impl<T> VecDeque<T> { // Safety: the following two methods require that the rotation amount // be less than half the length of the deque. // - // `wrap_copy` requres that `min(x, cap() - x) + copy_len <= cap()`, + // `wrap_copy` requires that `min(x, cap() - x) + copy_len <= cap()`, // but than `min` is never more than half the capacity, regardless of x, // so it's sound to call here because we're calling with something // less than half the length, which is never above half the capacity. diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 7523d9c5ba3..61416f2b906 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -2894,7 +2894,7 @@ where /// The filter test predicate. pred: F, /// A flag that indicates a panic has occurred in the filter test prodicate. - /// This is used as a hint in the drop implmentation to prevent consumption + /// This is used as a hint in the drop implementation to prevent consumption /// of the remainder of the `DrainFilter`. Any unprocessed items will be /// backshifted in the `vec`, but no further items will be dropped or /// tested by the filter predicate. |
