|
5 | 5 | use crate::io::Result;
|
6 | 6 | use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
|
7 | 7 | use crate::process;
|
| 8 | +use crate::sealed::Sealed; |
8 | 9 | #[cfg(not(doc))]
|
9 | 10 | use crate::sys::fd::FileDesc;
|
10 | 11 | use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
|
@@ -84,15 +85,10 @@ impl IntoRawFd for PidFd {
|
84 | 85 | }
|
85 | 86 | }
|
86 | 87 |
|
87 |
| -mod private_child_ext { |
88 |
| - pub trait Sealed {} |
89 |
| - impl Sealed for crate::process::Child {} |
90 |
| -} |
91 |
| - |
92 | 88 | /// Os-specific extensions for [`Child`]
|
93 | 89 | ///
|
94 | 90 | /// [`Child`]: process::Child
|
95 |
| -pub trait ChildExt: private_child_ext::Sealed { |
| 91 | +pub trait ChildExt: Sealed { |
96 | 92 | /// Obtains a reference to the [`PidFd`] created for this [`Child`], if available.
|
97 | 93 | ///
|
98 | 94 | /// A pidfd will only be available if its creation was requested with
|
@@ -120,15 +116,10 @@ pub trait ChildExt: private_child_ext::Sealed {
|
120 | 116 | fn take_pidfd(&mut self) -> Result<PidFd>;
|
121 | 117 | }
|
122 | 118 |
|
123 |
| -mod private_command_ext { |
124 |
| - pub trait Sealed {} |
125 |
| - impl Sealed for crate::process::Command {} |
126 |
| -} |
127 |
| - |
128 | 119 | /// Os-specific extensions for [`Command`]
|
129 | 120 | ///
|
130 | 121 | /// [`Command`]: process::Command
|
131 |
| -pub trait CommandExt: private_command_ext::Sealed { |
| 122 | +pub trait CommandExt: Sealed { |
132 | 123 | /// Sets whether a [`PidFd`](struct@PidFd) should be created for the [`Child`]
|
133 | 124 | /// spawned by this [`Command`].
|
134 | 125 | /// By default, no pidfd will be created.
|
|
0 commit comments