1515//! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
1616//! be used for an `O(n log n)` in-place heapsort.
1717//!
18- //! # Example
18+ //! # Examples
1919//!
2020//! This is a larger example which implements [Dijkstra's algorithm][dijkstra]
2121//! to solve the [shortest path problem][sssp] on a [directed graph][dir_graph].
@@ -178,7 +178,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
178178impl < T : Ord > BinaryHeap < T > {
179179 /// Creates an empty `BinaryHeap` as a max-heap.
180180 ///
181- /// # Example
181+ /// # Examples
182182 ///
183183 /// ```
184184 /// use std::collections::BinaryHeap;
@@ -192,7 +192,7 @@ impl<T: Ord> BinaryHeap<T> {
192192 /// so that the `BinaryHeap` does not have to be reallocated
193193 /// until it contains at least that many values.
194194 ///
195- /// # Example
195+ /// # Examples
196196 ///
197197 /// ```
198198 /// use std::collections::BinaryHeap;
@@ -206,7 +206,7 @@ impl<T: Ord> BinaryHeap<T> {
206206 /// Creates a `BinaryHeap` from a vector. This is sometimes called
207207 /// `heapifying` the vector.
208208 ///
209- /// # Example
209+ /// # Examples
210210 ///
211211 /// ```
212212 /// use std::collections::BinaryHeap;
@@ -225,7 +225,7 @@ impl<T: Ord> BinaryHeap<T> {
225225 /// An iterator visiting all values in underlying vector, in
226226 /// arbitrary order.
227227 ///
228- /// # Example
228+ /// # Examples
229229 ///
230230 /// ```
231231 /// use std::collections::BinaryHeap;
@@ -245,7 +245,7 @@ impl<T: Ord> BinaryHeap<T> {
245245 /// the binary heap in arbitrary order. The binary heap cannot be used
246246 /// after calling this.
247247 ///
248- /// # Example
248+ /// # Examples
249249 ///
250250 /// ```
251251 /// use std::collections::BinaryHeap;
@@ -264,7 +264,7 @@ impl<T: Ord> BinaryHeap<T> {
264264
265265 /// Returns the greatest item in a queue, or `None` if it is empty.
266266 ///
267- /// # Example
267+ /// # Examples
268268 ///
269269 /// ```
270270 /// use std::collections::BinaryHeap;
@@ -284,7 +284,7 @@ impl<T: Ord> BinaryHeap<T> {
284284
285285 /// Returns the number of elements the queue can hold without reallocating.
286286 ///
287- /// # Example
287+ /// # Examples
288288 ///
289289 /// ```
290290 /// use std::collections::BinaryHeap;
@@ -306,7 +306,7 @@ impl<T: Ord> BinaryHeap<T> {
306306 ///
307307 /// Panics if the new capacity overflows `uint`.
308308 ///
309- /// # Example
309+ /// # Examples
310310 ///
311311 /// ```
312312 /// use std::collections::BinaryHeap;
@@ -325,7 +325,7 @@ impl<T: Ord> BinaryHeap<T> {
325325 ///
326326 /// Panics if the new capacity overflows `uint`.
327327 ///
328- /// # Example
328+ /// # Examples
329329 ///
330330 /// ```
331331 /// use std::collections::BinaryHeap;
@@ -348,7 +348,7 @@ impl<T: Ord> BinaryHeap<T> {
348348 /// Removes the greatest item from a queue and returns it, or `None` if it
349349 /// is empty.
350350 ///
351- /// # Example
351+ /// # Examples
352352 ///
353353 /// ```
354354 /// use std::collections::BinaryHeap;
@@ -375,7 +375,7 @@ impl<T: Ord> BinaryHeap<T> {
375375
376376 /// Pushes an item onto the queue.
377377 ///
378- /// # Example
378+ /// # Examples
379379 ///
380380 /// ```
381381 /// use std::collections::BinaryHeap;
@@ -398,7 +398,7 @@ impl<T: Ord> BinaryHeap<T> {
398398 /// Pushes an item onto a queue then pops the greatest item off the queue in
399399 /// an optimized fashion.
400400 ///
401- /// # Example
401+ /// # Examples
402402 ///
403403 /// ```
404404 /// use std::collections::BinaryHeap;
@@ -424,7 +424,7 @@ impl<T: Ord> BinaryHeap<T> {
424424 /// an optimized fashion. The push is done regardless of whether the queue
425425 /// was empty.
426426 ///
427- /// # Example
427+ /// # Examples
428428 ///
429429 /// ```
430430 /// use std::collections::BinaryHeap;
@@ -450,7 +450,7 @@ impl<T: Ord> BinaryHeap<T> {
450450 /// Consumes the `BinaryHeap` and returns the underlying vector
451451 /// in arbitrary order.
452452 ///
453- /// # Example
453+ /// # Examples
454454 ///
455455 /// ```
456456 /// use std::collections::BinaryHeap;
@@ -468,7 +468,7 @@ impl<T: Ord> BinaryHeap<T> {
468468 /// Consumes the `BinaryHeap` and returns a vector in sorted
469469 /// (ascending) order.
470470 ///
471- /// # Example
471+ /// # Examples
472472 ///
473473 /// ```
474474 /// use std::collections::BinaryHeap;
0 commit comments