Fix compilation errors

This commit is contained in:
Taha Hawa 2025-04-18 10:05:12 -04:00
parent 8a1e20bda5
commit 2d97cac64b

View File

@ -3,7 +3,7 @@ mod widget;
use log::{debug, error, info};
use tokio::sync::mpsc;
use tokio_stream::StreamExt;
use tui_logger::{TuiWidgetEvent, TuiWidgetState};
use tui_logger::{TuiLoggerFile, TuiWidgetEvent, TuiWidgetState};
use widget::{help::HelpWidget, score::ScoreListWidget};
use std::{panic, sync::Arc, time::Duration};
@ -36,13 +36,13 @@ pub mod tui {
/// modules::dummy::{ErrorScore, PanicScore, SuccessScore},
/// topology::HAClusterTopology,
/// };
///
///
/// #[tokio::main]
/// async fn main() {
/// let inventory = Inventory::autoload();
/// let topology = HAClusterTopology::autoload();
/// let mut maestro = Maestro::new(inventory, topology);
///
///
/// maestro.register_all(vec![
/// Box::new(SuccessScore {}),
/// Box::new(ErrorScore {}),
@ -123,7 +123,7 @@ impl<T: Topology + std::fmt::Debug + Send + Sync + 'static> HarmonyTUI<T> {
// Set default level for unknown targets to Trace
tui_logger::set_default_level(log::LevelFilter::Info);
std::fs::create_dir_all("log")?;
tui_logger::set_log_file("log/harmony.log").unwrap();
tui_logger::set_log_file(TuiLoggerFile::new("log/harmony.log"));
color_eyre::install()?;
let mut terminal = ratatui::init();