fix: improve code formatting and module organization

- Corrected code formatting issues such as inconsistent line breaks and unnecessary trailing commas.
- Reorganized `mod.rs` to ensure proper order of module declarations.
- Fixed misplaced imports in `help.rs` and corrected the rendering method signature.
- Cleaned up unused code lines and moved `dummy` module declaration to its correct position.
This commit is contained in:
2025-02-04 14:44:58 -05:00
parent 134f2b78d6
commit e5b4b5114e
11 changed files with 59 additions and 56 deletions

View File

@@ -10,11 +10,12 @@ impl HelpWidget {
impl Widget for HelpWidget {
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
where
Self: Sized {
Self: Sized,
{
let text = Paragraph::new("Usage => q/Esc: Quit | j/↑ :Select UP | k/↓: Select Down | Enter: Launch Score\nPageUp/PageDown: Scroll Logs | Shift+G/End: Logs bottom")
.centered()
.wrap(Wrap { trim: false });
Widget::render(text, area, buf)
}
}

View File

@@ -1,2 +1,2 @@
pub mod score;
pub mod help;
pub mod score;

View File

@@ -3,10 +3,10 @@ use std::sync::{Arc, RwLock};
use crossterm::event::{Event, KeyCode, KeyEventKind};
use log::{info, warn};
use ratatui::{
Frame,
layout::Rect,
style::{Style, Stylize},
widgets::{List, ListState, StatefulWidget, Widget},
Frame,
};
use tokio::sync::mpsc;
@@ -78,7 +78,6 @@ impl ScoreListWidget {
frame.render_widget(self, area);
}
fn clear_execution(&mut self) {
match self.execution.take() {
Some(execution) => {