monitoring kit
Diffstat (limited to 'cpu/src/main.rs')
-rw-r--r--cpu/src/main.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/cpu/src/main.rs b/cpu/src/main.rs
index adc0e29..9973dc6 100644
--- a/cpu/src/main.rs
+++ b/cpu/src/main.rs
@@ -224,12 +224,14 @@ fn main() -> Result<()> {
}
g.draw(|y| {
- inter(
- [243, 64, 64].map(|x| x as f32 / 255.0), // red
- [228, 197, 63].map(|x| x as f32 / 255.0), // yellow
- y as f32 / (h - 1) as f32,
+ Some(
+ inter(
+ [243, 64, 64].map(|x| x as f32 / 255.0), // red
+ [228, 197, 63].map(|x| x as f32 / 255.0), // yellow
+ y as f32 / (h - 1) as f32,
+ )
+ .map(|x| (x * 255.0) as u8),
)
- .map(|x| (x * 255.0) as u8)
})?;
write!(g.buffer, "{}{}", White.fg_str(), cursor::Goto(1, 1))?;