diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-02-09 22:16:58 +0000 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-02-10 23:57:25 +0000 |
| commit | 99ed06eb8864e704c4a1871ccda4648273bee4ef (patch) | |
| tree | fedfce65fa389e4fc58636bfbb9d9997656e3470 /src/liballoc/collections | |
| parent | b87363e7632b3f20f9b529696ffb5d5d9c3927cd (diff) | |
| download | rust-99ed06eb8864e704c4a1871ccda4648273bee4ef.tar.gz rust-99ed06eb8864e704c4a1871ccda4648273bee4ef.zip | |
libs: doc comments
Diffstat (limited to 'src/liballoc/collections')
| -rw-r--r-- | src/liballoc/collections/binary_heap.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/collections/btree/map.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/collections/btree/node.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/collections/btree/set.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/collections/vec_deque.rs | 8 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs index 6214e1ce245..3b94379b58f 100644 --- a/src/liballoc/collections/binary_heap.rs +++ b/src/liballoc/collections/binary_heap.rs @@ -863,7 +863,7 @@ struct Hole<'a, T: 'a> { } impl<'a, T> Hole<'a, T> { - /// Create a new Hole at index `pos`. + /// Create a new `Hole` at index `pos`. /// /// Unsafe because pos must be within the data slice. #[inline] diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index aaaa419dcb8..5ec5064b735 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -2368,7 +2368,7 @@ impl<'a, K: Ord, V> OccupiedEntry<'a, K, V> { /// Gets a mutable reference to the value in the entry. /// - /// If you need a reference to the `OccupiedEntry` which may outlive the + /// If you need a reference to the `OccupiedEntry` that may outlive the /// destruction of the `Entry` value, see [`into_mut`]. /// /// [`into_mut`]: #method.into_mut diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index 481ee7cebc4..eb0667228d1 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -1295,7 +1295,7 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker:: } } - /// Returns whether it is valid to call `.merge()`, i.e., whether there is enough room in + /// Returns `true` if it is valid to call `.merge()`, i.e., whether there is enough room in /// a node to hold the combination of the nodes to the left and right of this handle along /// with the key/value pair at this handle. pub fn can_merge(&self) -> bool { @@ -1573,7 +1573,7 @@ unsafe fn move_edges<K, V>( impl<BorrowType, K, V, HandleType> Handle<NodeRef<BorrowType, K, V, marker::LeafOrInternal>, HandleType> { - /// Check whether the underlying node is an `Internal` node or a `Leaf` node. + /// Checks whether the underlying node is an `Internal` node or a `Leaf` node. pub fn force(self) -> ForceResult< Handle<NodeRef<BorrowType, K, V, marker::Leaf>, HandleType>, Handle<NodeRef<BorrowType, K, V, marker::Internal>, HandleType> diff --git a/src/liballoc/collections/btree/set.rs b/src/liballoc/collections/btree/set.rs index 78cd21dd411..870e3e47692 100644 --- a/src/liballoc/collections/btree/set.rs +++ b/src/liballoc/collections/btree/set.rs @@ -556,7 +556,7 @@ impl<T: Ord> BTreeSet<T> { Recover::replace(&mut self.map, value) } - /// Removes a value from the set. Returns `true` if the value was + /// Removes a value from the set. Returns whether the value was /// present in the set. /// /// The value may be any borrowed form of the set's value type, @@ -988,7 +988,7 @@ impl<'a, T> DoubleEndedIterator for Range<'a, T> { #[stable(feature = "fused", since = "1.26.0")] impl<T> FusedIterator for Range<'_, T> {} -/// Compare `x` and `y`, but return `short` if x is None and `long` if y is None +/// Compares `x` and `y`, but return `short` if x is None and `long` if y is None fn cmp_opt<T: Ord>(x: Option<&T>, y: Option<&T>, short: Ordering, long: Ordering) -> Ordering { match (x, y) { (None, _) => short, diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index a292bde3315..b6fdaa89992 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -124,7 +124,7 @@ impl<T> VecDeque<T> { ptr::write(self.ptr().add(off), value); } - /// Returns `true` if and only if the buffer is at full capacity. + /// Returns `true` if the buffer is at full capacity. #[inline] fn is_full(&self) -> bool { self.cap() - self.len() == 1 @@ -560,7 +560,7 @@ impl<T> VecDeque<T> { /// Does nothing if the capacity is already sufficient. /// /// Note that the allocator may give the collection more space than it - /// requests. Therefore capacity can not be relied upon to be precisely + /// requests. Therefore, capacity can not be relied upon to be precisely /// minimal. Prefer `reserve` if future insertions are expected. /// /// # Errors @@ -924,7 +924,7 @@ impl<T> VecDeque<T> { self.tail == self.head } - /// Create a draining iterator that removes the specified range in the + /// Creates a draining iterator that removes the specified range in the /// `VecDeque` and yields the removed items. /// /// Note 1: The element range is removed even if the iterator is not @@ -932,7 +932,7 @@ impl<T> VecDeque<T> { /// /// Note 2: It is unspecified how many elements are removed from the deque, /// if the `Drain` value is not dropped, but the borrow it holds expires - /// (eg. due to mem::forget). + /// (e.g., due to `mem::forget`). /// /// # Panics /// |
