Returns true if stdin is connected to a terminal.
()
| 1782 | |
| 1783 | /// Returns true if stdin is connected to a terminal. |
| 1784 | fn atty_stdin() -> bool { |
| 1785 | use std::io::IsTerminal; |
| 1786 | std::io::stdin().is_terminal() |
| 1787 | } |
| 1788 | |
| 1789 | #[cfg(test)] |
| 1790 | #[allow(clippy::unwrap_used)] |
no test coverage detected