diff options
| author | Mads Marquart <mads@marquart.dk> | 2024-04-28 17:34:17 +0200 |
|---|---|---|
| committer | Mads Marquart <mads@marquart.dk> | 2024-04-28 21:10:32 +0200 |
| commit | 79c6d9196658c1f304972bae3c5a6567816e9888 (patch) | |
| tree | 181447440010fc28a5e57f88c212d85e2d0ee548 | |
| parent | d9c0eb8084deb65de69b23a7714b66efbff7eb03 (diff) | |
| download | rust-79c6d9196658c1f304972bae3c5a6567816e9888.tar.gz rust-79c6d9196658c1f304972bae3c5a6567816e9888.zip | |
Fix available_parallelism on watchOS and visionOS
Both `sysconf` and `_SC_NPROCESSORS_ONLN` is available on all Apple platforms.
| -rw-r--r-- | library/std/src/sys/pal/unix/thread.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index faa70ff8e79..853ef8736de 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -315,11 +315,9 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> { target_os = "emscripten", target_os = "fuchsia", target_os = "hurd", - target_os = "ios", - target_os = "tvos", target_os = "linux", - target_os = "macos", target_os = "aix", + target_vendor = "apple", ))] { #[allow(unused_assignments)] #[allow(unused_mut)] |
