diff options
| author | Mads Marquart <mads@marquart.dk> | 2024-04-28 18:22:37 +0200 | 
|---|---|---|
| committer | Mads Marquart <mads@marquart.dk> | 2024-04-28 18:22:37 +0200 | 
| commit | d9c0eb8084deb65de69b23a7714b66efbff7eb03 (patch) | |
| tree | aac29bbed1315261cad4d77a0025225c1ee658f4 /library/std/src/sys/pal/unix/thread.rs | |
| parent | cb4940645775f60d74aee2e018d6c516c5aa9ed7 (diff) | |
| download | rust-d9c0eb8084deb65de69b23a7714b66efbff7eb03.tar.gz rust-d9c0eb8084deb65de69b23a7714b66efbff7eb03.zip | |
Use `target_vendor = "apple"` instead of `target_os = "..."`
Diffstat (limited to 'library/std/src/sys/pal/unix/thread.rs')
| -rw-r--r-- | library/std/src/sys/pal/unix/thread.rs | 14 | 
1 files changed, 2 insertions, 12 deletions
| diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index 6a6bfc77a85..faa70ff8e79 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -150,13 +150,7 @@ impl Thread { } } - #[cfg(any( - target_os = "macos", - target_os = "ios", - target_os = "watchos", - target_os = "visionos", - target_os = "tvos" - ))] + #[cfg(target_vendor = "apple")] pub fn set_name(name: &CStr) { unsafe { let name = truncate_cstr::<{ libc::MAXTHREADNAMESIZE }>(name); @@ -301,14 +295,10 @@ impl Drop for Thread { #[cfg(any( target_os = "linux", - target_os = "macos", - target_os = "ios", - target_os = "tvos", - target_os = "watchos", - target_os = "visionos", target_os = "nto", target_os = "solaris", target_os = "illumos", + target_vendor = "apple", ))] fn truncate_cstr<const MAX_WITH_NUL: usize>(cstr: &CStr) -> [libc::c_char; MAX_WITH_NUL] { let mut result = [0; MAX_WITH_NUL]; | 
