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].
@@ -180,7 +180,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
180
180
impl < T : Ord > BinaryHeap < T > {
181
181
/// Creates an empty `BinaryHeap` as a max-heap.
182
182
///
183
- /// # Example
183
+ /// # Examples
184
184
///
185
185
/// ```
186
186
/// use std::collections::BinaryHeap;
@@ -194,7 +194,7 @@ impl<T: Ord> BinaryHeap<T> {
194
194
/// so that the `BinaryHeap` does not have to be reallocated
195
195
/// until it contains at least that many values.
196
196
///
197
- /// # Example
197
+ /// # Examples
198
198
///
199
199
/// ```
200
200
/// use std::collections::BinaryHeap;
@@ -208,7 +208,7 @@ impl<T: Ord> BinaryHeap<T> {
208
208
/// Creates a `BinaryHeap` from a vector. This is sometimes called
209
209
/// `heapifying` the vector.
210
210
///
211
- /// # Example
211
+ /// # Examples
212
212
///
213
213
/// ```
214
214
/// use std::collections::BinaryHeap;
@@ -227,7 +227,7 @@ impl<T: Ord> BinaryHeap<T> {
227
227
/// An iterator visiting all values in underlying vector, in
228
228
/// arbitrary order.
229
229
///
230
- /// # Example
230
+ /// # Examples
231
231
///
232
232
/// ```
233
233
/// use std::collections::BinaryHeap;
@@ -247,7 +247,7 @@ impl<T: Ord> BinaryHeap<T> {
247
247
/// the binary heap in arbitrary order. The binary heap cannot be used
248
248
/// after calling this.
249
249
///
250
- /// # Example
250
+ /// # Examples
251
251
///
252
252
/// ```
253
253
/// use std::collections::BinaryHeap;
@@ -266,7 +266,7 @@ impl<T: Ord> BinaryHeap<T> {
266
266
267
267
/// Returns the greatest item in a queue, or `None` if it is empty.
268
268
///
269
- /// # Example
269
+ /// # Examples
270
270
///
271
271
/// ```
272
272
/// use std::collections::BinaryHeap;
@@ -286,7 +286,7 @@ impl<T: Ord> BinaryHeap<T> {
286
286
287
287
/// Returns the number of elements the queue can hold without reallocating.
288
288
///
289
- /// # Example
289
+ /// # Examples
290
290
///
291
291
/// ```
292
292
/// use std::collections::BinaryHeap;
@@ -308,7 +308,7 @@ impl<T: Ord> BinaryHeap<T> {
308
308
///
309
309
/// Panics if the new capacity overflows `uint`.
310
310
///
311
- /// # Example
311
+ /// # Examples
312
312
///
313
313
/// ```
314
314
/// use std::collections::BinaryHeap;
@@ -327,7 +327,7 @@ impl<T: Ord> BinaryHeap<T> {
327
327
///
328
328
/// Panics if the new capacity overflows `uint`.
329
329
///
330
- /// # Example
330
+ /// # Examples
331
331
///
332
332
/// ```
333
333
/// use std::collections::BinaryHeap;
@@ -350,7 +350,7 @@ impl<T: Ord> BinaryHeap<T> {
350
350
/// Removes the greatest item from a queue and returns it, or `None` if it
351
351
/// is empty.
352
352
///
353
- /// # Example
353
+ /// # Examples
354
354
///
355
355
/// ```
356
356
/// use std::collections::BinaryHeap;
@@ -377,7 +377,7 @@ impl<T: Ord> BinaryHeap<T> {
377
377
378
378
/// Pushes an item onto the queue.
379
379
///
380
- /// # Example
380
+ /// # Examples
381
381
///
382
382
/// ```
383
383
/// use std::collections::BinaryHeap;
@@ -400,7 +400,7 @@ impl<T: Ord> BinaryHeap<T> {
400
400
/// Pushes an item onto a queue then pops the greatest item off the queue in
401
401
/// an optimized fashion.
402
402
///
403
- /// # Example
403
+ /// # Examples
404
404
///
405
405
/// ```
406
406
/// use std::collections::BinaryHeap;
@@ -426,7 +426,7 @@ impl<T: Ord> BinaryHeap<T> {
426
426
/// an optimized fashion. The push is done regardless of whether the queue
427
427
/// was empty.
428
428
///
429
- /// # Example
429
+ /// # Examples
430
430
///
431
431
/// ```
432
432
/// use std::collections::BinaryHeap;
@@ -452,7 +452,7 @@ impl<T: Ord> BinaryHeap<T> {
452
452
/// Consumes the `BinaryHeap` and returns the underlying vector
453
453
/// in arbitrary order.
454
454
///
455
- /// # Example
455
+ /// # Examples
456
456
///
457
457
/// ```
458
458
/// use std::collections::BinaryHeap;
@@ -470,7 +470,7 @@ impl<T: Ord> BinaryHeap<T> {
470
470
/// Consumes the `BinaryHeap` and returns a vector in sorted
471
471
/// (ascending) order.
472
472
///
473
- /// # Example
473
+ /// # Examples
474
474
///
475
475
/// ```
476
476
/// use std::collections::BinaryHeap;
0 commit comments