Rollup merge of #106564 - Folyd:feat-repeatn, r=scottmcm
Change to immutable borrow when cloning element of RepeatN
This commit is contained in:
commit
3076f26988
@ -126,7 +126,7 @@ fn next(&mut self) -> Option<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)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user