mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Auto merge of #112280 - zica87:master, r=workingjubilee
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.
This commit is contained in:
commit
2e0136a131
@ -1121,19 +1121,6 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
|
|||||||
/// ```
|
/// ```
|
||||||
/// use std::collections::BTreeSet;
|
/// 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 set = BTreeSet::from([3, 1, 2]);
|
||||||
/// let mut set_iter = set.iter();
|
/// let mut set_iter = set.iter();
|
||||||
/// assert_eq!(set_iter.next(), Some(&1));
|
/// assert_eq!(set_iter.next(), Some(&1));
|
||||||
|
Loading…
Reference in New Issue
Block a user