Skip to content

Commit 2c95695

Browse files
committed
Updates from comments
1 parent 4477be0 commit 2c95695

File tree

1 file changed

+4
-20
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+4
-20
lines changed

library/std/src/sys/pal/unix/fd.rs

+4-20
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,9 @@ const READ_LIMIT: usize = libc::ssize_t::MAX as usize;
4545
#[cfg(any(
4646
target_os = "dragonfly",
4747
target_os = "freebsd",
48-
target_os = "ios",
49-
target_os = "tvos",
50-
target_os = "macos",
5148
target_os = "netbsd",
5249
target_os = "openbsd",
53-
target_os = "watchos",
54-
target_os = "visionos",
50+
target_vendor = "apple",
5551
))]
5652
const fn max_iov() -> usize {
5753
libc::IOV_MAX as usize
@@ -72,17 +68,13 @@ const fn max_iov() -> usize {
7268
target_os = "dragonfly",
7369
target_os = "emscripten",
7470
target_os = "freebsd",
75-
target_os = "ios",
76-
target_os = "tvos",
7771
target_os = "linux",
78-
target_os = "macos",
7972
target_os = "netbsd",
8073
target_os = "nto",
8174
target_os = "openbsd",
8275
target_os = "horizon",
8376
target_os = "vita",
84-
target_os = "watchos",
85-
target_os = "visionos",
77+
target_vendor = "apple",
8678
)))]
8779
const fn max_iov() -> usize {
8880
16 // The minimum value required by POSIX.
@@ -201,14 +193,10 @@ impl FileDesc {
201193
target_os = "fuchsia",
202194
target_os = "hurd",
203195
target_os = "illumos",
204-
target_os = "ios",
205-
target_os = "tvos",
206196
target_os = "linux",
207-
target_os = "macos",
208197
target_os = "netbsd",
209198
target_os = "openbsd",
210-
target_os = "watchos",
211-
target_os = "visionos",
199+
target_vendor = "apple",
212200
)))]
213201
pub fn read_vectored_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result<usize> {
214202
io::default_read_vectored(|b| self.read_at(b, offset), bufs)
@@ -362,14 +350,10 @@ impl FileDesc {
362350
target_os = "fuchsia",
363351
target_os = "hurd",
364352
target_os = "illumos",
365-
target_os = "ios",
366-
target_os = "tvos",
367353
target_os = "linux",
368-
target_os = "macos",
369354
target_os = "netbsd",
370355
target_os = "openbsd",
371-
target_os = "watchos",
372-
target_os = "visionos",
356+
target_vendor = "apple",
373357
)))]
374358
pub fn write_vectored_at(&self, bufs: &[IoSlice<'_>], offset: u64) -> io::Result<usize> {
375359
io::default_write_vectored(|b| self.write_at(b, offset), bufs)

0 commit comments

Comments
 (0)