Skip to content

Commit 69a3b0e

Browse files
committed
visionOS: Fix unused import warning
The import is used once in this file, inside `posix_spawn`, so let's move the import into that function instead, to reduce the number of `cfg`s that need to be kept in sync.
1 parent efbbfa2 commit 69a3b0e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

library/std/src/sys/pal/unix/process/process_unix.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ use crate::os::linux::process::PidFd;
1111
#[cfg(target_os = "linux")]
1212
use crate::os::unix::io::AsRawFd;
1313

14-
#[cfg(any(
15-
target_os = "macos",
16-
target_os = "watchos",
17-
target_os = "visionos",
18-
target_os = "tvos",
19-
target_os = "freebsd",
20-
all(target_os = "linux", target_env = "gnu"),
21-
all(target_os = "linux", target_env = "musl"),
22-
target_os = "nto",
23-
))]
24-
use crate::sys::weak::weak;
25-
2614
#[cfg(target_os = "vxworks")]
2715
use libc::RTP_ID as pid_t;
2816

@@ -466,6 +454,7 @@ impl Command {
466454
envp: Option<&CStringArray>,
467455
) -> io::Result<Option<Process>> {
468456
use crate::mem::MaybeUninit;
457+
use crate::sys::weak::weak;
469458
use crate::sys::{self, cvt_nz, unix_sigpipe_attr_specified};
470459

471460
if self.get_gid().is_some()

0 commit comments

Comments
 (0)