Address comments
This commit is contained in:
parent
c0e913fdd7
commit
87db7c32a7
@ -116,9 +116,7 @@ impl<T: Clone, A: Allocator + Clone> Clone for VecDeque<T, A> {
|
||||
/// Overwrites the contents of `self` with a clone of the contents of `source`.
|
||||
///
|
||||
/// This method is preferred over simply assigning `source.clone()` to `self`,
|
||||
/// as it avoids reallocation if possible. Additionally, if the element type
|
||||
/// `T` overrides `clone_from()`, this will reuse the resources of `self`'s
|
||||
/// elements as well.
|
||||
/// as it avoids reallocation if possible.
|
||||
fn clone_from(&mut self, source: &Self) {
|
||||
self.clear();
|
||||
self.extend(source.iter().cloned());
|
||||
|
@ -1273,7 +1273,7 @@ impl<T: Clone> Clone for RefCell<T> {
|
||||
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if `other` is currently mutably borrowed.
|
||||
/// Panics if `source` is currently mutably borrowed.
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
fn clone_from(&mut self, source: &Self) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user