Comment out or remove unused sections
This commit is contained in:
parent
b06c0db27d
commit
081fd22de1
2 changed files with 23 additions and 30 deletions
|
|
@ -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<UnboundedSender<Action>>,
|
||||
config: Config,
|
||||
// command_tx: Option<UnboundedSender<Action>>,
|
||||
// config: Config,
|
||||
lines: Vec<ProgressLine>,
|
||||
mode: Mode,
|
||||
}
|
||||
|
|
@ -62,15 +56,15 @@ impl Progress {
|
|||
Self::default()
|
||||
}
|
||||
|
||||
fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> Result<()> {
|
||||
self.command_tx = Some(tx);
|
||||
Ok(())
|
||||
}
|
||||
// fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> 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 {
|
||||
|
|
|
|||
|
|
@ -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<UnboundedSender<Action>>,
|
||||
config: Config,
|
||||
// command_tx: Option<UnboundedSender<Action>>,
|
||||
// config: Config,
|
||||
}
|
||||
|
||||
impl Results {
|
||||
|
|
@ -31,23 +30,23 @@ impl Results {
|
|||
Self::default()
|
||||
}
|
||||
|
||||
fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> Result<()> {
|
||||
self.command_tx = Some(tx);
|
||||
Ok(())
|
||||
}
|
||||
// fn register_action_handler(&mut self, tx: UnboundedSender<Action>) -> 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<Option<Action>> {
|
||||
fn update(&mut self, _action: Action) -> Result<Option<Action>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> {
|
||||
fn draw(&mut self, _frame: &mut Frame, _area: Rect) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue