Skip to content

Commit fb0aa42

Browse files
committed
Fix available_parallelism on watchOS and visionOS
Both `sysconf` and `_SC_NPROCESSORS_ONLN` is available on all Apple platforms.
1 parent d2f0f29 commit fb0aa42

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

std/src/sys/pal/unix/thread.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,9 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
315315
target_os = "emscripten",
316316
target_os = "fuchsia",
317317
target_os = "hurd",
318-
target_os = "ios",
319-
target_os = "tvos",
320318
target_os = "linux",
321-
target_os = "macos",
322319
target_os = "aix",
320+
target_vendor = "apple",
323321
))] {
324322
#[allow(unused_assignments)]
325323
#[allow(unused_mut)]

0 commit comments

Comments
 (0)