diff options
| author | bors <bors@rust-lang.org> | 2024-02-16 07:46:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-16 07:46:31 +0000 |
| commit | 1be468815cb7c6932fcc7ed3ee81e6a14376c05e (patch) | |
| tree | b0b4d37f0274c53c54e2245a73973c6ba1db47bd /library/std/src/sys/pal/wasm/atomics/thread.rs | |
| parent | 0f806a9812b62c36bdab08d33c14cf2d3ecf4355 (diff) | |
| parent | a90cc05233858fcd16c3ca0e0b4320fc5ae09af2 (diff) | |
| download | rust-1be468815cb7c6932fcc7ed3ee81e6a14376c05e.tar.gz rust-1be468815cb7c6932fcc7ed3ee81e6a14376c05e.zip | |
Auto merge of #120486 - reitermarkus:use-generic-nonzero, r=dtolnay
Use generic `NonZero` internally. Tracking issue: https://github.com/rust-lang/rust/issues/120257
Diffstat (limited to 'library/std/src/sys/pal/wasm/atomics/thread.rs')
| -rw-r--r-- | library/std/src/sys/pal/wasm/atomics/thread.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/pal/wasm/atomics/thread.rs b/library/std/src/sys/pal/wasm/atomics/thread.rs index 714b7049227..49f936f1449 100644 --- a/library/std/src/sys/pal/wasm/atomics/thread.rs +++ b/library/std/src/sys/pal/wasm/atomics/thread.rs @@ -1,6 +1,6 @@ use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::sys::unsupported; use crate::time::Duration; @@ -40,7 +40,7 @@ impl Thread { pub fn join(self) {} } -pub fn available_parallelism() -> io::Result<NonZeroUsize> { +pub fn available_parallelism() -> io::Result<NonZero<usize>> { unsupported() } |
