diff --git a/build/release/linutil b/build/release/linutil index ec3242e6..abee02e2 100755 Binary files a/build/release/linutil and b/build/release/linutil differ diff --git a/src/list.rs b/src/list.rs index b9d50753..b564bdea 100644 --- a/src/list.rs +++ b/src/list.rs @@ -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; } @@ -383,4 +384,4 @@ impl CustomList { fn at_root(&self) -> bool { self.visit_stack.len() == 1 } -} \ No newline at end of file +} diff --git a/src/main.rs b/src/main.rs index 43d2410a..7acfcfb0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -95,6 +95,5 @@ fn run(terminal: &mut Terminal) -> io::Result<()> { } } } - } } diff --git a/src/running_command.rs b/src/running_command.rs index 0bed71c1..9d159ef7 100644 --- a/src/running_command.rs +++ b/src/running_command.rs @@ -30,7 +30,7 @@ pub struct RunningCommand { buffer: Arc>>, /// A handle of the tread where the command is being executed - command_thread: Option>, + command_thread: Option>, /// A handle to kill the running process, it's an option because it can only be used once child_killer: Option>>, @@ -279,4 +279,4 @@ impl RunningCommand { // Send the keycodes to the virtual terminal let _ = self.writer.write_all(&input_bytes); } -} \ No newline at end of file +} diff --git a/src/theme.rs b/src/theme.rs index c741e75b..71413752 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -31,9 +31,9 @@ pub const THEMES: [Theme; 2] = [ ]; pub fn get_theme() -> &'static Theme { - &THEMES[unsafe { THEME_IDX } ] + &THEMES[unsafe { THEME_IDX }] } -pub fn set_theme(idx: usize){ +pub fn set_theme(idx: usize) { unsafe { THEME_IDX = idx }; }