We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d72b7d2 commit a139fd0Copy full SHA for a139fd0
library/core/src/iter/sources/repeat_n.rs
@@ -126,7 +126,7 @@ impl<A: Clone> Iterator for RepeatN<A> {
126
// zero so it won't be dropped later, and thus it's okay to take it here.
127
unsafe { ManuallyDrop::take(&mut self.element) }
128
} else {
129
- A::clone(&mut self.element)
+ A::clone(&self.element)
130
})
131
}
132
0 commit comments