This isn't really idiomatic rust. There's no exhaustiveness check, and you're checking whether you have `Some(exit_code)` twice (for both exit_code and term_signal.

This would be better done as:

```rust
match *obj {
    ExitStatus(code) => write!(f.buf, "exit code: {}", code),
    TermSignal(code) => write!(f.buf, "signal: {}", code),
}
```