Skip to content

Commit ec3ea6f

Browse files
coolreader18simlay
authored andcommitted
Address comments
1 parent 1793215 commit ec3ea6f

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
@@ -1277,7 +1277,7 @@ impl<T: Clone> Clone for RefCell<T> {
12771277

12781278
/// # Panics
12791279
///
1280-
/// Panics if `other` is currently mutably borrowed.
1280+
/// Panics if `source` is currently mutably borrowed.
12811281
#[inline]
12821282
#[track_caller]
12831283
fn clone_from(&mut self, source: &Self) {

0 commit comments

Comments
 (0)