Comment out or remove unused sections

This commit is contained in:
2Shirt 2025-05-20 20:25:01 -07:00
parent b06c0db27d
commit 081fd22de1
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 23 additions and 30 deletions

View file

@ -21,13 +21,11 @@ use ratatui::{
text::{Line, Span}, text::{Line, Span},
widgets::{Block, Borders, Clear, Paragraph}, widgets::{Block, Borders, Clear, Paragraph},
}; };
use tokio::sync::mpsc::UnboundedSender;
use tracing::info; use tracing::info;
use core::{ use core::{
action::{Action, DiagResult}, action::{Action, DiagResult},
components::Component, components::Component,
config::Config,
state::Mode, state::Mode,
}; };
@ -42,16 +40,12 @@ impl ProgressLine {
pub fn len_name(&self) -> usize { pub fn len_name(&self) -> usize {
self.name.chars().count() self.name.chars().count()
} }
pub fn len_text(&self) -> usize {
self.text.chars().count()
}
} }
#[derive(Default, Debug, Clone)] #[derive(Default, Debug, Clone)]
pub struct Progress { pub struct Progress {
command_tx: Option<UnboundedSender<Action>>, // command_tx: Option<UnboundedSender<Action>>,
config: Config, // config: Config,
lines: Vec<ProgressLine>, lines: Vec<ProgressLine>,
mode: Mode, mode: Mode,
} }
@ -62,15 +56,15 @@ impl Progress {
Self::default() Self::default()
} }
fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> Result<()> { // fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> Result<()> {
self.command_tx = Some(tx); // self.command_tx = Some(tx);
Ok(()) // Ok(())
} // }
fn register_config_handler(&mut self, config: Config) -> Result<()> { // fn register_config_handler(&mut self, config: Config) -> Result<()> {
self.config = config; // self.config = config;
Ok(()) // Ok(())
} // }
} }
impl Component for Progress { impl Component for Progress {

View file

@ -15,14 +15,13 @@
// //
use color_eyre::Result; use color_eyre::Result;
use ratatui::{Frame, layout::Rect}; 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)] #[derive(Default, Debug, Clone)]
pub struct Results { pub struct Results {
command_tx: Option<UnboundedSender<Action>>, // command_tx: Option<UnboundedSender<Action>>,
config: Config, // config: Config,
} }
impl Results { impl Results {
@ -31,23 +30,23 @@ impl Results {
Self::default() Self::default()
} }
fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> Result<()> { // fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> Result<()> {
self.command_tx = Some(tx); // self.command_tx = Some(tx);
Ok(()) // Ok(())
} // }
fn register_config_handler(&mut self, config: Config) -> Result<()> { // fn register_config_handler(&mut self, config: Config) -> Result<()> {
self.config = config; // self.config = config;
Ok(()) // Ok(())
} // }
} }
impl Component for Results { impl Component for Results {
fn update(&mut self, action: Action) -> Result<Option<Action>> { fn update(&mut self, _action: Action) -> Result<Option<Action>> {
Ok(None) Ok(None)
} }
fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> { fn draw(&mut self, _frame: &mut Frame, _area: Rect) -> Result<()> {
Ok(()) Ok(())
} }
} }