From 5a6400b8b08518a0063e17d5001e8ae93cbce053 Mon Sep 17 00:00:00 2001 From: zica <59327276+zica87@users.noreply.github.com> Date: Sun, 4 Jun 2023 23:48:37 +0800 Subject: [PATCH] Remove redundant example of `BTreeSet::iter` --- library/alloc/src/collections/btree/set.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index 940fa30afb8..cc0e8d46435 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -1124,19 +1124,6 @@ pub fn drain_filter<'a, F>(&'a mut self, pred: F) -> DrainFilter<'a, T, F, 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));