Skip to content

Commit daa2bde

Browse files
committed
auto merge of #19655 : jbranchaud/rust/change-example-to-examples, r=steveklabnik
@steveklabnik I got a start on this.
2 parents fddec2d + c09defa commit daa2bde

File tree

16 files changed

+286
-283
lines changed

16 files changed

+286
-283
lines changed

src/libcollections/binary_heap.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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].
@@ -180,7 +180,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
180180
impl<T: Ord> BinaryHeap<T> {
181181
/// Creates an empty `BinaryHeap` as a max-heap.
182182
///
183-
/// # Example
183+
/// # Examples
184184
///
185185
/// ```
186186
/// use std::collections::BinaryHeap;
@@ -194,7 +194,7 @@ impl<T: Ord> BinaryHeap<T> {
194194
/// so that the `BinaryHeap` does not have to be reallocated
195195
/// until it contains at least that many values.
196196
///
197-
/// # Example
197+
/// # Examples
198198
///
199199
/// ```
200200
/// use std::collections::BinaryHeap;
@@ -208,7 +208,7 @@ impl<T: Ord> BinaryHeap<T> {
208208
/// Creates a `BinaryHeap` from a vector. This is sometimes called
209209
/// `heapifying` the vector.
210210
///
211-
/// # Example
211+
/// # Examples
212212
///
213213
/// ```
214214
/// use std::collections::BinaryHeap;
@@ -227,7 +227,7 @@ impl<T: Ord> BinaryHeap<T> {
227227
/// An iterator visiting all values in underlying vector, in
228228
/// arbitrary order.
229229
///
230-
/// # Example
230+
/// # Examples
231231
///
232232
/// ```
233233
/// use std::collections::BinaryHeap;
@@ -247,7 +247,7 @@ impl<T: Ord> BinaryHeap<T> {
247247
/// the binary heap in arbitrary order. The binary heap cannot be used
248248
/// after calling this.
249249
///
250-
/// # Example
250+
/// # Examples
251251
///
252252
/// ```
253253
/// use std::collections::BinaryHeap;
@@ -266,7 +266,7 @@ impl<T: Ord> BinaryHeap<T> {
266266

267267
/// Returns the greatest item in a queue, or `None` if it is empty.
268268
///
269-
/// # Example
269+
/// # Examples
270270
///
271271
/// ```
272272
/// use std::collections::BinaryHeap;
@@ -286,7 +286,7 @@ impl<T: Ord> BinaryHeap<T> {
286286

287287
/// Returns the number of elements the queue can hold without reallocating.
288288
///
289-
/// # Example
289+
/// # Examples
290290
///
291291
/// ```
292292
/// use std::collections::BinaryHeap;
@@ -308,7 +308,7 @@ impl<T: Ord> BinaryHeap<T> {
308308
///
309309
/// Panics if the new capacity overflows `uint`.
310310
///
311-
/// # Example
311+
/// # Examples
312312
///
313313
/// ```
314314
/// use std::collections::BinaryHeap;
@@ -327,7 +327,7 @@ impl<T: Ord> BinaryHeap<T> {
327327
///
328328
/// Panics if the new capacity overflows `uint`.
329329
///
330-
/// # Example
330+
/// # Examples
331331
///
332332
/// ```
333333
/// use std::collections::BinaryHeap;
@@ -350,7 +350,7 @@ impl<T: Ord> BinaryHeap<T> {
350350
/// Removes the greatest item from a queue and returns it, or `None` if it
351351
/// is empty.
352352
///
353-
/// # Example
353+
/// # Examples
354354
///
355355
/// ```
356356
/// use std::collections::BinaryHeap;
@@ -377,7 +377,7 @@ impl<T: Ord> BinaryHeap<T> {
377377

378378
/// Pushes an item onto the queue.
379379
///
380-
/// # Example
380+
/// # Examples
381381
///
382382
/// ```
383383
/// use std::collections::BinaryHeap;
@@ -400,7 +400,7 @@ impl<T: Ord> BinaryHeap<T> {
400400
/// Pushes an item onto a queue then pops the greatest item off the queue in
401401
/// an optimized fashion.
402402
///
403-
/// # Example
403+
/// # Examples
404404
///
405405
/// ```
406406
/// use std::collections::BinaryHeap;
@@ -426,7 +426,7 @@ impl<T: Ord> BinaryHeap<T> {
426426
/// an optimized fashion. The push is done regardless of whether the queue
427427
/// was empty.
428428
///
429-
/// # Example
429+
/// # Examples
430430
///
431431
/// ```
432432
/// use std::collections::BinaryHeap;
@@ -452,7 +452,7 @@ impl<T: Ord> BinaryHeap<T> {
452452
/// Consumes the `BinaryHeap` and returns the underlying vector
453453
/// in arbitrary order.
454454
///
455-
/// # Example
455+
/// # Examples
456456
///
457457
/// ```
458458
/// use std::collections::BinaryHeap;
@@ -470,7 +470,7 @@ impl<T: Ord> BinaryHeap<T> {
470470
/// Consumes the `BinaryHeap` and returns a vector in sorted
471471
/// (ascending) order.
472472
///
473-
/// # Example
473+
/// # Examples
474474
///
475475
/// ```
476476
/// use std::collections::BinaryHeap;

0 commit comments

Comments
 (0)