(&self)
| 241 | } |
| 242 | |
| 243 | fn color(&self) -> (Option<u8>, Option<u8>) { |
| 244 | for o in self.captured_out.iter().rev() { |
| 245 | if let CapturedOut::SetColor(fg, bg) = o { |
| 246 | return (*fg, *bg); |
| 247 | } |
| 248 | } |
| 249 | (None, None) |
| 250 | } |
| 251 | |
| 252 | fn set_color(&mut self, fg: Option<u8>, bg: Option<u8>) -> io::Result<()> { |
| 253 | self.captured_out.push(CapturedOut::SetColor(fg, bg)); |