diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2018-03-03 18:29:30 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2018-03-03 18:44:44 -0800 |
| commit | 74c5c6e6cb0425284f57fece6fbf248e827ea06d (patch) | |
| tree | d6c4863688aedf2527b3fa2dd806704b5ae0c33e /src/libstd/sys/cloudabi | |
| parent | 2ce2b40ee5f847f02d6da1b81f3303b8e8b23531 (diff) | |
| download | rust-74c5c6e6cb0425284f57fece6fbf248e827ea06d.tar.gz rust-74c5c6e6cb0425284f57fece6fbf248e827ea06d.zip | |
Move process::ExitCode internals to sys
Now begins the saga of fixing compilation errors on other platforms...
Diffstat (limited to 'src/libstd/sys/cloudabi')
| -rw-r--r-- | src/libstd/sys/cloudabi/shims/process.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/sys/cloudabi/shims/process.rs b/src/libstd/sys/cloudabi/shims/process.rs index 52e8c82e2b2..fcd40c15c17 100644 --- a/src/libstd/sys/cloudabi/shims/process.rs +++ b/src/libstd/sys/cloudabi/shims/process.rs @@ -126,6 +126,18 @@ impl fmt::Display for ExitStatus { } } +#[derive(PartialEq, Eq, Clone, Copy, Debug)] +pub struct ExitCode(bool); + +impl ExitCode { + pub const SUCCESS: ExitCode = ExitCode(false); + pub const FAILURE: ExitCode = ExitCode(true); + + pub fn as_i32(&self) -> i32 { + self.0 as i32 + } +} + pub struct Process(Void); impl Process { |
