about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorMarkus Reiter <me@reitermark.us>2024-02-08 23:03:25 +0100
committerMarkus Reiter <me@reitermark.us>2024-02-15 08:09:42 +0100
commita90cc05233858fcd16c3ca0e0b4320fc5ae09af2 (patch)
tree003c31cd913ce7f1acb1bd12aeca0fcde1ccfee6 /library/core/src/array
parent746a58d4359786e4aebb372a30829706fa5a968f (diff)
downloadrust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.tar.gz
rust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.zip
Replace `NonZero::<_>::new` with `NonZero::new`.
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/iter.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs
index e50ae1b0d70..e3d2cd2a31f 100644
--- a/library/core/src/array/iter.rs
+++ b/library/core/src/array/iter.rs
@@ -292,7 +292,7 @@ impl<T, const N: usize> Iterator for IntoIter<T, N> {
             ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice));
         }
 
-        NonZero::<usize>::new(remaining).map_or(Ok(()), Err)
+        NonZero::new(remaining).map_or(Ok(()), Err)
     }
 
     #[inline]
@@ -347,7 +347,7 @@ impl<T, const N: usize> DoubleEndedIterator for IntoIter<T, N> {
             ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice));
         }
 
-        NonZero::<usize>::new(remaining).map_or(Ok(()), Err)
+        NonZero::new(remaining).map_or(Ok(()), Err)
     }
 }