(&mut self, text: &str)
| 369 | } |
| 370 | |
| 371 | fn print(&mut self, text: &str) -> io::Result<()> { |
| 372 | let text = remove_control_chars(text.to_owned()); |
| 373 | |
| 374 | let stdout = io::stdout(); |
| 375 | let mut stdout = stdout.lock(); |
| 376 | stdout.write_all(text.as_bytes())?; |
| 377 | if self.is_tty { |
| 378 | stdout.write_all(b"\r\n")?; |
| 379 | } else { |
| 380 | stdout.write_all(b"\n")?; |
| 381 | } |
| 382 | Ok(()) |
| 383 | } |
| 384 | |
| 385 | async fn poll_key(&mut self) -> io::Result<Option<Key>> { |
| 386 | (self as &mut dyn InputOps).poll_key().await |
nothing calls this directly
no test coverage detected