Returns true if the console is too narrow for the standard interface. A narrow console is defined as one that cannot fit the welcome message.
(console: &dyn Console)
| 493 | /// |
| 494 | /// A narrow console is defined as one that cannot fit the welcome message. |
| 495 | pub fn is_narrow(console: &dyn Console) -> bool { |
| 496 | match console.size_chars() { |
| 497 | Ok(size) => size.x < 50, |
| 498 | Err(_) => false, |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | #[cfg(test)] |
| 503 | mod tests { |
no test coverage detected