mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
Fix an unused import warning.
This commit is contained in:
parent
cada5fb336
commit
a7d9ab5835
@ -4,7 +4,6 @@ use crate::io::{self, Error, ErrorKind};
|
|||||||
use crate::mem;
|
use crate::mem;
|
||||||
use crate::num::NonZeroI32;
|
use crate::num::NonZeroI32;
|
||||||
use crate::os::raw::NonZero_c_int;
|
use crate::os::raw::NonZero_c_int;
|
||||||
use crate::os::unix::io::FromRawFd;
|
|
||||||
use crate::ptr;
|
use crate::ptr;
|
||||||
use crate::sys;
|
use crate::sys;
|
||||||
use crate::sys::cvt;
|
use crate::sys::cvt;
|
||||||
@ -550,6 +549,7 @@ pub struct Process {
|
|||||||
impl Process {
|
impl Process {
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
unsafe fn new(pid: pid_t, pidfd: pid_t) -> Self {
|
unsafe fn new(pid: pid_t, pidfd: pid_t) -> Self {
|
||||||
|
use crate::os::unix::io::FromRawFd;
|
||||||
use crate::sys_common::FromInner;
|
use crate::sys_common::FromInner;
|
||||||
// Safety: If `pidfd` is nonnegative, we assume it's valid and otherwise unowned.
|
// Safety: If `pidfd` is nonnegative, we assume it's valid and otherwise unowned.
|
||||||
let pidfd = (pidfd >= 0)
|
let pidfd = (pidfd >= 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user