mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 21:28:48 +00:00
Merge pull request #55 from adamperkowski/main
Add formatting fixes and remove dead code
This commit is contained in:
commit
7125cac196
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,5 @@ fn run<B: Backend>(terminal: &mut Terminal<B>) -> io::Result<()> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user