diff options
Diffstat (limited to 'src/sandbox/mod.rs')
| -rw-r--r-- | src/sandbox/mod.rs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/sandbox/mod.rs b/src/sandbox/mod.rs index 3bd4b3b..6c90f7f 100644 --- a/src/sandbox/mod.rs +++ b/src/sandbox/mod.rs @@ -39,19 +39,26 @@ impl Cmd { } } -#[derive(Debug)] -pub struct Exit { - pub code: Option<i32>, - pub stdout: Vec<u8>, - pub stderr: Vec<u8>, -} +mod exit { + #[derive(Debug)] + pub struct Exit { + pub code: Option<i32>, + pub stdout: Vec<u8>, + pub stderr: Vec<u8>, + } -impl Exit { - pub fn success(&self) -> bool { - self.code == Some(0) + impl Exit { + pub fn success(&self) -> bool { + self.code == Some(0) + } } } +#[cfg(feature = "test-support")] +pub use exit::Exit; +#[cfg(not(feature = "test-support"))] +pub(crate) use exit::Exit; + #[derive(Debug, Clone)] pub struct SandboxSpec { pub profile: String, |
