about summary refs log tree commit diff
path: root/library/std/src/sys/pal/uefi/thread.rs
diff options
context:
space:
mode:
authorMarkus Reiter <me@reitermark.us>2024-01-29 23:59:09 +0100
committerMarkus Reiter <me@reitermark.us>2024-02-15 08:09:42 +0100
commit746a58d4359786e4aebb372a30829706fa5a968f (patch)
treed8e13fb3fc93deb5aa964c863bad51f67937c104 /library/std/src/sys/pal/uefi/thread.rs
parentee9c7c940c07d8b67c9a6b2ec930db70dcd23a46 (diff)
downloadrust-746a58d4359786e4aebb372a30829706fa5a968f.tar.gz
rust-746a58d4359786e4aebb372a30829706fa5a968f.zip
Use generic `NonZero` internally.
Diffstat (limited to 'library/std/src/sys/pal/uefi/thread.rs')
-rw-r--r--library/std/src/sys/pal/uefi/thread.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/uefi/thread.rs b/library/std/src/sys/pal/uefi/thread.rs
index ddfc3af2f50..f6f5b20a421 100644
--- a/library/std/src/sys/pal/uefi/thread.rs
+++ b/library/std/src/sys/pal/uefi/thread.rs
@@ -1,7 +1,7 @@
 use super::unsupported;
 use crate::ffi::CStr;
 use crate::io;
-use crate::num::NonZeroUsize;
+use crate::num::NonZero;
 use crate::ptr::NonNull;
 use crate::time::Duration;
 
@@ -44,9 +44,9 @@ impl Thread {
     }
 }
 
-pub fn available_parallelism() -> io::Result<NonZeroUsize> {
+pub fn available_parallelism() -> io::Result<NonZero<usize>> {
     // UEFI is single threaded
-    Ok(NonZeroUsize::new(1).unwrap())
+    Ok(NonZero::<usize>::new(1).unwrap())
 }
 
 pub mod guard {