Skip to content

Commit 87db7c3

Browse files
committed
Address comments
1 parent c0e913f commit 87db7c3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

library/alloc/src/collections/vec_deque/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ impl<T: Clone, A: Allocator + Clone> Clone for VecDeque<T, A> {
116116
/// Overwrites the contents of `self` with a clone of the contents of `source`.
117117
///
118118
/// This method is preferred over simply assigning `source.clone()` to `self`,
119-
/// as it avoids reallocation if possible. Additionally, if the element type
120-
/// `T` overrides `clone_from()`, this will reuse the resources of `self`'s
121-
/// elements as well.
119+
/// as it avoids reallocation if possible.
122120
fn clone_from(&mut self, source: &Self) {
123121
self.clear();
124122
self.extend(source.iter().cloned());

library/core/src/cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ impl<T: Clone> Clone for RefCell<T> {
12731273

12741274
/// # Panics
12751275
///
1276-
/// Panics if `other` is currently mutably borrowed.
1276+
/// Panics if `source` is currently mutably borrowed.
12771277
#[inline]
12781278
#[track_caller]
12791279
fn clone_from(&mut self, source: &Self) {

0 commit comments

Comments
 (0)