diff options
| author | joboet <jonasboettiger@icloud.com> | 2025-09-16 15:48:43 +0200 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2025-09-21 19:45:46 +0200 |
| commit | 87a00f67ba4c8148e6aa2e1768025b9d51a0fa8b (patch) | |
| tree | f1ef39f35d44e02ccbb151a001d65dd0676b9b9f /library/std/src/process.rs | |
| parent | 6710835ae739ca326441ff6c63d24fb123858300 (diff) | |
| download | rust-87a00f67ba4c8148e6aa2e1768025b9d51a0fa8b.tar.gz rust-87a00f67ba4c8148e6aa2e1768025b9d51a0fa8b.zip | |
std: merge definitions of `StdioPipes`
All platforms define this structure the same way, so we can just put it in the `process` module directly.
Diffstat (limited to 'library/std/src/process.rs')
| -rw-r--r-- | library/std/src/process.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 0883e56342c..5c0ac526a36 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -268,8 +268,8 @@ impl AsInner<imp::Process> for Child { } } -impl FromInner<(imp::Process, imp::StdioPipes)> for Child { - fn from_inner((handle, io): (imp::Process, imp::StdioPipes)) -> Child { +impl FromInner<(imp::Process, StdioPipes)> for Child { + fn from_inner((handle, io): (imp::Process, StdioPipes)) -> Child { Child { handle, stdin: io.stdin.map(ChildStdin::from_inner), @@ -296,6 +296,15 @@ impl fmt::Debug for Child { } } +/// The pipes connected to a spawned process. +/// +/// Used to pass pipe handles between this module and [`imp`]. +pub(crate) struct StdioPipes { + pub stdin: Option<AnonPipe>, + pub stdout: Option<AnonPipe>, + pub stderr: Option<AnonPipe>, +} + /// A handle to a child process's standard input (stdin). /// /// This struct is used in the [`stdin`] field on [`Child`]. |
