diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-06 12:13:55 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-06 15:19:31 +0100 |
| commit | 136ad015b6862274bf8c161dc5d2955409ed1465 (patch) | |
| tree | 44213c111b970f7f07b47611a2287e986a7f7a24 /src/liballoc | |
| parent | 865b44a3e330f3ef8be0f6edf69896c9ed957ac0 (diff) | |
| download | rust-136ad015b6862274bf8c161dc5d2955409ed1465.tar.gz rust-136ad015b6862274bf8c161dc5d2955409ed1465.zip | |
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 a9b4e3e4706..e10d0db9d9a 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 3fd7be06fd4..05f3dd28e98 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. |
