mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-03 17:35:28 +03:00
document iteration ordering on into_iter method instead of IntoIterator implementation
This commit is contained in:
@@ -1632,12 +1632,12 @@ pub(super) fn iter(&self) -> Iter<'_, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets an owning iterator over the entries of the map, sorted by key.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<K, V, A: Allocator + Clone> IntoIterator for BTreeMap<K, V, A> {
|
||||
type Item = (K, V);
|
||||
type IntoIter = IntoIter<K, V, A>;
|
||||
|
||||
/// Gets an owning iterator over the entries of the map, sorted by key.
|
||||
fn into_iter(self) -> IntoIter<K, V, A> {
|
||||
let mut me = ManuallyDrop::new(self);
|
||||
if let Some(root) = me.root.take() {
|
||||
|
||||
@@ -1232,13 +1232,12 @@ fn from_sorted_iter<I: Iterator<Item = T>>(iter: I, alloc: A) -> BTreeSet<T, A>
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets an owning iterator over the elements of the `BTreeSet` in ascending order.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T, A: Allocator + Clone> IntoIterator for BTreeSet<T, A> {
|
||||
type Item = T;
|
||||
type IntoIter = IntoIter<T, A>;
|
||||
|
||||
/// Gets an iterator for moving out the `BTreeSet`'s contents.
|
||||
/// Gets an iterator for moving out the `BTreeSet`'s contents in ascending order.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user