Skip to content

Commit

Permalink
Rollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Feb 28, 2022
2 parents 97cde9f + 249eb1c commit 9d23c32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library/alloc/src/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ impl<K, V> BTreeMap<K, V> {
self.drain_filter(|k, v| !f(k, v));
}

/// Moves all elements from `other` into `Self`, leaving `other` empty.
/// Moves all elements from `other` into `self`, leaving `other` empty.
///
/// # Examples
///
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/collections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ impl<T> BTreeSet<T> {
self.drain_filter(|v| !f(v));
}

/// Moves all elements from `other` into `Self`, leaving `other` empty.
/// Moves all elements from `other` into `self`, leaving `other` empty.
///
/// # Examples
///
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@ impl<T, A: Allocator> Vec<T, A> {
}
}

/// Moves all the elements of `other` into `Self`, leaving `other` empty.
/// Moves all the elements of `other` into `self`, leaving `other` empty.
///
/// # Panics
///
Expand All @@ -1788,7 +1788,7 @@ impl<T, A: Allocator> Vec<T, A> {
}
}

/// Appends elements to `Self` from other buffer.
/// Appends elements to `self` from other buffer.
#[cfg(not(no_global_oom_handling))]
#[inline]
unsafe fn append_elements(&mut self, other: *const [T]) {
Expand Down

0 comments on commit 9d23c32

Please sign in to comment.