Skip to content

Commit

Permalink
Auto merge of #112280 - zica87:master, r=workingjubilee
Browse files Browse the repository at this point in the history
Remove redundant example of `BTreeSet::iter`

The usage and that `Values returned by the iterator are returned in ascending order` are already demonstrated by the other example and the description, so I removed the useless one.
  • Loading branch information
bors committed Jul 30, 2023
2 parents fb53384 + 5a6400b commit 2e0136a
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions library/alloc/src/collections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,19 +1121,6 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
/// ```
/// use std::collections::BTreeSet;
///
/// let set = BTreeSet::from([1, 2, 3]);
/// let mut set_iter = set.iter();
/// assert_eq!(set_iter.next(), Some(&1));
/// assert_eq!(set_iter.next(), Some(&2));
/// assert_eq!(set_iter.next(), Some(&3));
/// assert_eq!(set_iter.next(), None);
/// ```
///
/// Values returned by the iterator are returned in ascending order:
///
/// ```
/// use std::collections::BTreeSet;
///
/// let set = BTreeSet::from([3, 1, 2]);
/// let mut set_iter = set.iter();
/// assert_eq!(set_iter.next(), Some(&1));
Expand Down

0 comments on commit 2e0136a

Please sign in to comment.