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/std/src/sys_common | |
| parent | 746a58d4359786e4aebb372a30829706fa5a968f (diff) | |
| download | rust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.tar.gz rust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.zip | |
Replace `NonZero::<_>::new` with `NonZero::new`.
Diffstat (limited to 'library/std/src/sys_common')
| -rw-r--r-- | library/std/src/sys_common/wstr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys_common/wstr.rs b/library/std/src/sys_common/wstr.rs index 601ef3dd150..8eae1606485 100644 --- a/library/std/src/sys_common/wstr.rs +++ b/library/std/src/sys_common/wstr.rs @@ -26,7 +26,7 @@ impl WStrUnits<'_> { pub fn peek(&self) -> Option<NonZero<u16>> { // SAFETY: It's always safe to read the current item because we don't // ever move out of the array's bounds. - unsafe { NonZero::<u16>::new(*self.lpwstr.as_ptr()) } + unsafe { NonZero::new(*self.lpwstr.as_ptr()) } } /// Advance the iterator while `predicate` returns true. |
