@@ -6,20 +6,16 @@ use crate::ffi::OsStr;
6
6
use crate :: io;
7
7
use crate :: os:: unix:: io:: { AsRawFd , FromRawFd , IntoRawFd , RawFd } ;
8
8
use crate :: process;
9
+ use crate :: sealed:: Sealed ;
9
10
use crate :: sys;
10
11
use crate :: sys_common:: { AsInner , AsInnerMut , FromInner , IntoInner } ;
11
12
12
- mod private {
13
- /// This trait being unreachable from outside the crate
14
- /// prevents other implementations of the `ExitStatusExt` trait,
15
- /// which allows potentially adding more trait methods in the future.
16
- #[ stable( feature = "none" , since = "1.51.0" ) ]
17
- pub trait Sealed { }
18
- }
19
-
20
13
/// Unix-specific extensions to the [`process::Command`] builder.
14
+ ///
15
+ /// This trait is sealed: it cannot be implemented outside the standard library.
16
+ /// This is so that future additional methods are not breaking changes.
21
17
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
22
- pub trait CommandExt {
18
+ pub trait CommandExt : Sealed {
23
19
/// Sets the child process's user ID. This translates to a
24
20
/// `setuid` call in the child process. Failure in the `setuid`
25
21
/// call will cause the spawn to fail.
@@ -193,7 +189,7 @@ impl CommandExt for process::Command {
193
189
/// This trait is sealed: it cannot be implemented outside the standard library.
194
190
/// This is so that future additional methods are not breaking changes.
195
191
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
196
- pub trait ExitStatusExt : private :: Sealed {
192
+ pub trait ExitStatusExt : Sealed {
197
193
/// Creates a new `ExitStatus` from the raw underlying `i32` return value of
198
194
/// a process.
199
195
#[ stable( feature = "exit_status_from" , since = "1.12.0" ) ]
@@ -228,9 +224,6 @@ pub trait ExitStatusExt: private::Sealed {
228
224
fn into_raw ( self ) -> i32 ;
229
225
}
230
226
231
- #[ stable( feature = "none" , since = "1.51.0" ) ]
232
- impl private:: Sealed for process:: ExitStatus { }
233
-
234
227
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
235
228
impl ExitStatusExt for process:: ExitStatus {
236
229
fn from_raw ( raw : i32 ) -> Self {
0 commit comments