forked from NationTech/harmony
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
pub mod score;
|
||||
pub mod help;
|
||||
pub mod score;
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user