15
15
//! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
16
16
//! be used for an `O(n log n)` in-place heapsort.
17
17
//!
18
- //! # Example
18
+ //! # Examples
19
19
//!
20
20
//! This is a larger example which implements [Dijkstra's algorithm][dijkstra]
21
21
//! to solve the [shortest path problem][sssp] on a [directed graph][dir_graph].
@@ -178,7 +178,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
178
178
impl < T : Ord > BinaryHeap < T > {
179
179
/// Creates an empty `BinaryHeap` as a max-heap.
180
180
///
181
- /// # Example
181
+ /// # Examples
182
182
///
183
183
/// ```
184
184
/// use std::collections::BinaryHeap;
@@ -192,7 +192,7 @@ impl<T: Ord> BinaryHeap<T> {
192
192
/// so that the `BinaryHeap` does not have to be reallocated
193
193
/// until it contains at least that many values.
194
194
///
195
- /// # Example
195
+ /// # Examples
196
196
///
197
197
/// ```
198
198
/// use std::collections::BinaryHeap;
@@ -206,7 +206,7 @@ impl<T: Ord> BinaryHeap<T> {
206
206
/// Creates a `BinaryHeap` from a vector. This is sometimes called
207
207
/// `heapifying` the vector.
208
208
///
209
- /// # Example
209
+ /// # Examples
210
210
///
211
211
/// ```
212
212
/// use std::collections::BinaryHeap;
@@ -225,7 +225,7 @@ impl<T: Ord> BinaryHeap<T> {
225
225
/// An iterator visiting all values in underlying vector, in
226
226
/// arbitrary order.
227
227
///
228
- /// # Example
228
+ /// # Examples
229
229
///
230
230
/// ```
231
231
/// use std::collections::BinaryHeap;
@@ -245,7 +245,7 @@ impl<T: Ord> BinaryHeap<T> {
245
245
/// the binary heap in arbitrary order. The binary heap cannot be used
246
246
/// after calling this.
247
247
///
248
- /// # Example
248
+ /// # Examples
249
249
///
250
250
/// ```
251
251
/// use std::collections::BinaryHeap;
@@ -264,7 +264,7 @@ impl<T: Ord> BinaryHeap<T> {
264
264
265
265
/// Returns the greatest item in a queue, or `None` if it is empty.
266
266
///
267
- /// # Example
267
+ /// # Examples
268
268
///
269
269
/// ```
270
270
/// use std::collections::BinaryHeap;
@@ -284,7 +284,7 @@ impl<T: Ord> BinaryHeap<T> {
284
284
285
285
/// Returns the number of elements the queue can hold without reallocating.
286
286
///
287
- /// # Example
287
+ /// # Examples
288
288
///
289
289
/// ```
290
290
/// use std::collections::BinaryHeap;
@@ -306,7 +306,7 @@ impl<T: Ord> BinaryHeap<T> {
306
306
///
307
307
/// Panics if the new capacity overflows `uint`.
308
308
///
309
- /// # Example
309
+ /// # Examples
310
310
///
311
311
/// ```
312
312
/// use std::collections::BinaryHeap;
@@ -325,7 +325,7 @@ impl<T: Ord> BinaryHeap<T> {
325
325
///
326
326
/// Panics if the new capacity overflows `uint`.
327
327
///
328
- /// # Example
328
+ /// # Examples
329
329
///
330
330
/// ```
331
331
/// use std::collections::BinaryHeap;
@@ -348,7 +348,7 @@ impl<T: Ord> BinaryHeap<T> {
348
348
/// Removes the greatest item from a queue and returns it, or `None` if it
349
349
/// is empty.
350
350
///
351
- /// # Example
351
+ /// # Examples
352
352
///
353
353
/// ```
354
354
/// use std::collections::BinaryHeap;
@@ -375,7 +375,7 @@ impl<T: Ord> BinaryHeap<T> {
375
375
376
376
/// Pushes an item onto the queue.
377
377
///
378
- /// # Example
378
+ /// # Examples
379
379
///
380
380
/// ```
381
381
/// use std::collections::BinaryHeap;
@@ -398,7 +398,7 @@ impl<T: Ord> BinaryHeap<T> {
398
398
/// Pushes an item onto a queue then pops the greatest item off the queue in
399
399
/// an optimized fashion.
400
400
///
401
- /// # Example
401
+ /// # Examples
402
402
///
403
403
/// ```
404
404
/// use std::collections::BinaryHeap;
@@ -424,7 +424,7 @@ impl<T: Ord> BinaryHeap<T> {
424
424
/// an optimized fashion. The push is done regardless of whether the queue
425
425
/// was empty.
426
426
///
427
- /// # Example
427
+ /// # Examples
428
428
///
429
429
/// ```
430
430
/// use std::collections::BinaryHeap;
@@ -450,7 +450,7 @@ impl<T: Ord> BinaryHeap<T> {
450
450
/// Consumes the `BinaryHeap` and returns the underlying vector
451
451
/// in arbitrary order.
452
452
///
453
- /// # Example
453
+ /// # Examples
454
454
///
455
455
/// ```
456
456
/// use std::collections::BinaryHeap;
@@ -468,7 +468,7 @@ impl<T: Ord> BinaryHeap<T> {
468
468
/// Consumes the `BinaryHeap` and returns a vector in sorted
469
469
/// (ascending) order.
470
470
///
471
- /// # Example
471
+ /// # Examples
472
472
///
473
473
/// ```
474
474
/// use std::collections::BinaryHeap;
0 commit comments