From 4207c786e752ed7495782c39b74917bbcaf438cf Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Tue, 8 Apr 2025 23:26:36 -0700 Subject: PR feedback --- library/core/src/array/iter/iter_inner.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'library/core/src/array') diff --git a/library/core/src/array/iter/iter_inner.rs b/library/core/src/array/iter/iter_inner.rs index f43d9e7ddd6..3c2343591f8 100644 --- a/library/core/src/array/iter/iter_inner.rs +++ b/library/core/src/array/iter/iter_inner.rs @@ -31,9 +31,9 @@ impl PartialDrop for [MaybeUninit; N] { /// The real `array::IntoIter` stores a `PolymorphicIter<[MaybeUninit, N]>` /// which it unsizes to `PolymorphicIter<[MaybeUninit]>` to iterate. #[allow(private_bounds)] -pub(super) struct PolymorphicIter +pub(super) struct PolymorphicIter where - TAIL: PartialDrop, + DATA: PartialDrop, { /// The elements in `data` that have not been yielded yet. /// @@ -55,13 +55,13 @@ where /// - `data[alive]` is alive (i.e. contains valid elements) /// - `data[..alive.start]` and `data[alive.end..]` are dead (i.e. the /// elements were already read and must not be touched anymore!) - data: TAIL, + data: DATA, } #[allow(private_bounds)] -impl PolymorphicIter +impl PolymorphicIter where - TAIL: PartialDrop, + DATA: PartialDrop, { #[inline] pub(super) const fn len(&self) -> usize { @@ -70,9 +70,9 @@ where } #[allow(private_bounds)] -impl Drop for PolymorphicIter +impl Drop for PolymorphicIter where - TAIL: PartialDrop, + DATA: PartialDrop, { #[inline] fn drop(&mut self) { @@ -209,7 +209,7 @@ impl PolymorphicIter<[MaybeUninit]> { R: Try, { // `alive` is an `IndexRange`, not an arbitrary iterator, so we can - // trust that its `try_rfold` isn't going to do something weird like + // trust that its `try_fold` isn't going to do something weird like // call the fold-er multiple times for the same index. let data = &mut self.data; self.alive.try_fold(init, move |accum, idx| { -- cgit 1.4.1-3-g733a5