Skip to content

Commit f8a093c

Browse files
committed
document iteration ordering on into_iter method instead of IntoIterator implementation
1 parent f6f89dc commit f8a093c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

library/alloc/src/collections/btree/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1632,12 +1632,12 @@ impl<'a, K, V> IterMut<'a, K, V> {
16321632
}
16331633
}
16341634

1635-
/// Gets an owning iterator over the entries of the map, sorted by key.
16361635
#[stable(feature = "rust1", since = "1.0.0")]
16371636
impl<K, V, A: Allocator + Clone> IntoIterator for BTreeMap<K, V, A> {
16381637
type Item = (K, V);
16391638
type IntoIter = IntoIter<K, V, A>;
16401639

1640+
/// Gets an owning iterator over the entries of the map, sorted by key.
16411641
fn into_iter(self) -> IntoIter<K, V, A> {
16421642
let mut me = ManuallyDrop::new(self);
16431643
if let Some(root) = me.root.take() {

library/alloc/src/collections/btree/set.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1232,13 +1232,12 @@ impl<T: Ord, const N: usize> From<[T; N]> for BTreeSet<T> {
12321232
}
12331233
}
12341234

1235-
/// Gets an owning iterator over the elements of the `BTreeSet` in ascending order.
12361235
#[stable(feature = "rust1", since = "1.0.0")]
12371236
impl<T, A: Allocator + Clone> IntoIterator for BTreeSet<T, A> {
12381237
type Item = T;
12391238
type IntoIter = IntoIter<T, A>;
12401239

1241-
/// Gets an iterator for moving out the `BTreeSet`'s contents.
1240+
/// Gets an iterator for moving out the `BTreeSet`'s contents in ascending order.
12421241
///
12431242
/// # Examples
12441243
///

0 commit comments

Comments
 (0)