Merge pull request #55 from adamperkowski/main

Add formatting fixes and remove dead code
This commit is contained in:
Chris Titus 2024-07-23 21:44:55 -05:00 committed by GitHub
commit 7125cac196
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

Binary file not shown.

View File

@ -1,5 +1,3 @@
use std::usize;
use crate::{float::floating_window, theme::*};
use crossterm::event::{KeyCode, KeyEvent, KeyEventKind};
use ego_tree::{tree, NodeId};
@ -169,7 +167,10 @@ impl CustomList {
// node
let list = List::new(items)
.highlight_style(Style::default().reversed())
.block(Block::default().borders(Borders::ALL).title(format!("Linux Toolbox - {}", chrono::Local::now().format("%Y-%m-%d"))))
.block(Block::default().borders(Borders::ALL).title(format!(
"Linux Toolbox - {}",
chrono::Local::now().format("%Y-%m-%d")
)))
.scroll_padding(1);
// Render it
@ -251,7 +252,7 @@ impl CustomList {
// Get the selected command
if let Some(selected_command) = self.get_selected_command() {
// If command is a folder, we don't display a preview
if selected_command == "" {
if selected_command.is_empty() {
return;
}

View File

@ -95,6 +95,5 @@ fn run<B: Backend>(terminal: &mut Terminal<B>) -> io::Result<()> {
}
}
}
}
}