(&mut self)
| 73 | } |
| 74 | |
| 75 | pub fn poll_completed(&mut self) { |
| 76 | while let Ok(entry) = self.rx.try_recv() { |
| 77 | if let Some(existing) = self |
| 78 | .history |
| 79 | .iter_mut() |
| 80 | .rev() |
| 81 | .find(|item| item.command == entry.command && item.output == "Running...") |
| 82 | { |
| 83 | *existing = entry; |
| 84 | } else { |
| 85 | self.history.push(entry); |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | #[allow(dead_code)] |
| 91 | pub fn scroll_up(&mut self) { |