summaryrefslogtreecommitdiffstats
path: root/library/core/src/iter/sources/repeat_n.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/iter/sources/repeat_n.rs')
-rw-r--r--library/core/src/iter/sources/repeat_n.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/iter/sources/repeat_n.rs b/library/core/src/iter/sources/repeat_n.rs
index fd8d25ce1..dc61d6065 100644
--- a/library/core/src/iter/sources/repeat_n.rs
+++ b/library/core/src/iter/sources/repeat_n.rs
@@ -126,7 +126,7 @@ impl<A: Clone> Iterator for RepeatN<A> {
// zero so it won't be dropped later, and thus it's okay to take it here.
unsafe { ManuallyDrop::take(&mut self.element) }
} else {
- A::clone(&mut self.element)
+ A::clone(&self.element)
})
}