Stylistically, it is good to keep `unsafe` blocks as small as possible (e.g. so that one doesn't accidentally do something `unsafe` elsewhere), so in this case, `if unsafe {libc::isatty(libc::STDOUT_FILENO)} > 0 { `, or

```rust
let is_tty = unsafe {libc::isatty(libc::STDOUT_FILENO)};
if is_tty > 0 { ... }
```