diff options
| author | Markus Reiter <me@reitermark.us> | 2024-02-08 23:03:25 +0100 |
|---|---|---|
| committer | Markus Reiter <me@reitermark.us> | 2024-02-15 08:09:42 +0100 |
| commit | a90cc05233858fcd16c3ca0e0b4320fc5ae09af2 (patch) | |
| tree | 003c31cd913ce7f1acb1bd12aeca0fcde1ccfee6 /library/alloc/src/vec | |
| parent | 746a58d4359786e4aebb372a30829706fa5a968f (diff) | |
| download | rust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.tar.gz rust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.zip | |
Replace `NonZero::<_>::new` with `NonZero::new`.
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/into_iter.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs index 76d1b7b72a1..63d8fe19ac3 100644 --- a/library/alloc/src/vec/into_iter.rs +++ b/library/alloc/src/vec/into_iter.rs @@ -248,7 +248,7 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> { unsafe { ptr::drop_in_place(to_drop); } - NonZero::<usize>::new(n - step_size).map_or(Ok(()), Err) + NonZero::new(n - step_size).map_or(Ok(()), Err) } #[inline] @@ -350,7 +350,7 @@ impl<T, A: Allocator> DoubleEndedIterator for IntoIter<T, A> { unsafe { ptr::drop_in_place(to_drop); } - NonZero::<usize>::new(n - step_size).map_or(Ok(()), Err) + NonZero::new(n - step_size).map_or(Ok(()), Err) } } @@ -457,8 +457,8 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for IntoIter<T, A> { #[unstable(issue = "none", feature = "inplace_iteration")] #[doc(hidden)] unsafe impl<T, A: Allocator> InPlaceIterable for IntoIter<T, A> { - const EXPAND_BY: Option<NonZero<usize>> = NonZero::<usize>::new(1); - const MERGE_BY: Option<NonZero<usize>> = NonZero::<usize>::new(1); + const EXPAND_BY: Option<NonZero<usize>> = NonZero::new(1); + const MERGE_BY: Option<NonZero<usize>> = NonZero::new(1); } #[unstable(issue = "none", feature = "inplace_iteration")] |
