diff --git a/components/monitors/cu_consolemon/src/lib.rs b/components/monitors/cu_consolemon/src/lib.rs index b4319f7e6..471847abf 100644 --- a/components/monitors/cu_consolemon/src/lib.rs +++ b/components/monitors/cu_consolemon/src/lib.rs @@ -524,8 +524,10 @@ impl UI { })?; if event::poll(Duration::from_millis(50))? { - if let Event::Key(key) = event::read()? { - match key.code { + let event = event::read()?; + + match event { + Event::Key(key) => match key.code { KeyCode::Char('1') => self.active_screen = Screen::Neofetch, KeyCode::Char('2') => self.active_screen = Screen::Dag, KeyCode::Char('3') => self.active_screen = Screen::Latency, @@ -576,14 +578,15 @@ impl UI { break; } _ => {} - } - } + }, - #[cfg(feature = "debug_pane")] - if let Event::Resize(_columns, rows) = event::read()? { - if let Some(debug_output) = self.debug_output.as_mut() { - debug_output.max_rows.store(rows, Ordering::SeqCst) + #[cfg(feature = "debug_pane")] + Event::Resize(_columns, rows) => { + if let Some(debug_output) = self.debug_output.as_mut() { + debug_output.max_rows.store(rows, Ordering::SeqCst) + } } + _ => {} } } } diff --git a/examples/cu_caterpillar/Cargo.toml b/examples/cu_caterpillar/Cargo.toml index 6e2898f18..8bdf9ddc3 100644 --- a/examples/cu_caterpillar/Cargo.toml +++ b/examples/cu_caterpillar/Cargo.toml @@ -29,7 +29,8 @@ cu29 = { workspace = true } cu29-helpers = { workspace = true } cu29-export = { workspace = true } bincode = { workspace = true } -cu-consolemon = { path = "../../components/monitors/cu_consolemon", version = "0.6.0" } # needed +# cu-consolemon = { path = "../../components/monitors/cu_consolemon", default-features = false, version = "0.6" } # needed +cu-consolemon = { path = "../../components/monitors/cu_consolemon", version = "0.6" } # needed cu-rp-gpio = { path = "../../components/sinks/cu_rp_gpio", version = "0.6.0" } tempfile = "3.14.0"