diff --git a/boot_diags/src/components/progress.rs b/boot_diags/src/components/progress.rs index 5719af6..c1ad7da 100644 --- a/boot_diags/src/components/progress.rs +++ b/boot_diags/src/components/progress.rs @@ -21,13 +21,11 @@ use ratatui::{ text::{Line, Span}, widgets::{Block, Borders, Clear, Paragraph}, }; -use tokio::sync::mpsc::UnboundedSender; use tracing::info; use core::{ action::{Action, DiagResult}, components::Component, - config::Config, state::Mode, }; @@ -42,16 +40,12 @@ impl ProgressLine { pub fn len_name(&self) -> usize { self.name.chars().count() } - - pub fn len_text(&self) -> usize { - self.text.chars().count() - } } #[derive(Default, Debug, Clone)] pub struct Progress { - command_tx: Option>, - config: Config, + // command_tx: Option>, + // config: Config, lines: Vec, mode: Mode, } @@ -62,15 +56,15 @@ impl Progress { Self::default() } - fn register_action_handler(&mut self, tx: UnboundedSender) -> Result<()> { - self.command_tx = Some(tx); - Ok(()) - } + // fn register_action_handler(&mut self, tx: UnboundedSender) -> Result<()> { + // self.command_tx = Some(tx); + // Ok(()) + // } - fn register_config_handler(&mut self, config: Config) -> Result<()> { - self.config = config; - Ok(()) - } + // fn register_config_handler(&mut self, config: Config) -> Result<()> { + // self.config = config; + // Ok(()) + // } } impl Component for Progress { diff --git a/boot_diags/src/components/results.rs b/boot_diags/src/components/results.rs index 829b239..badd97a 100644 --- a/boot_diags/src/components/results.rs +++ b/boot_diags/src/components/results.rs @@ -15,14 +15,13 @@ // use color_eyre::Result; use ratatui::{Frame, layout::Rect}; -use tokio::sync::mpsc::UnboundedSender; -use core::{action::Action, components::Component, config::Config}; +use core::{action::Action, components::Component}; #[derive(Default, Debug, Clone)] pub struct Results { - command_tx: Option>, - config: Config, + // command_tx: Option>, + // config: Config, } impl Results { @@ -31,23 +30,23 @@ impl Results { Self::default() } - fn register_action_handler(&mut self, tx: UnboundedSender) -> Result<()> { - self.command_tx = Some(tx); - Ok(()) - } + // fn register_action_handler(&mut self, tx: UnboundedSender) -> Result<()> { + // self.command_tx = Some(tx); + // Ok(()) + // } - fn register_config_handler(&mut self, config: Config) -> Result<()> { - self.config = config; - Ok(()) - } + // fn register_config_handler(&mut self, config: Config) -> Result<()> { + // self.config = config; + // Ok(()) + // } } impl Component for Results { - fn update(&mut self, action: Action) -> Result> { + fn update(&mut self, _action: Action) -> Result> { Ok(None) } - fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> { + fn draw(&mut self, _frame: &mut Frame, _area: Rect) -> Result<()> { Ok(()) } }