Skip to content

Commit 9d23c32

Browse files
authored
Rollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC
fix typo in btree/vec doc: Self -> self this pr fixes #92345 the documentation refers to the object the method is called for, not the type, so it should be using the lower case self.
2 parents 97cde9f + 249eb1c commit 9d23c32

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ impl<K, V> BTreeMap<K, V> {
986986
self.drain_filter(|k, v| !f(k, v));
987987
}
988988

989-
/// Moves all elements from `other` into `Self`, leaving `other` empty.
989+
/// Moves all elements from `other` into `self`, leaving `other` empty.
990990
///
991991
/// # Examples
992992
///

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ impl<T> BTreeSet<T> {
895895
self.drain_filter(|v| !f(v));
896896
}
897897

898-
/// Moves all elements from `other` into `Self`, leaving `other` empty.
898+
/// Moves all elements from `other` into `self`, leaving `other` empty.
899899
///
900900
/// # Examples
901901
///

library/alloc/src/vec/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1763,7 +1763,7 @@ impl<T, A: Allocator> Vec<T, A> {
17631763
}
17641764
}
17651765

1766-
/// Moves all the elements of `other` into `Self`, leaving `other` empty.
1766+
/// Moves all the elements of `other` into `self`, leaving `other` empty.
17671767
///
17681768
/// # Panics
17691769
///
@@ -1788,7 +1788,7 @@ impl<T, A: Allocator> Vec<T, A> {
17881788
}
17891789
}
17901790

1791-
/// Appends elements to `Self` from other buffer.
1791+
/// Appends elements to `self` from other buffer.
17921792
#[cfg(not(no_global_oom_handling))]
17931793
#[inline]
17941794
unsafe fn append_elements(&mut self, other: *const [T]) {

0 commit comments

Comments
 (0)