Skip to content

Commit

Permalink
Rollup merge of #106564 - Folyd:feat-repeatn, r=scottmcm
Browse files Browse the repository at this point in the history
Change to immutable borrow when cloning element of RepeatN
  • Loading branch information
matthiaskrgr authored Jan 7, 2023
2 parents 98ad442 + a139fd0 commit 3076f26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/iter/sources/repeat_n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}

Expand Down

0 comments on commit 3076f26

Please sign in to comment.