diff options
-rw-r--r-- | src/interactive/app/eventloop.rs | 6 | ||||
-rw-r--r-- | src/interactive/widgets/help.rs | 4 | ||||
-rw-r--r-- | src/interactive/widgets/mark.rs | 2 | ||||
-rw-r--r-- | src/main.rs | 2 |
4 files changed, 6 insertions, 8 deletions
diff --git a/src/interactive/app/eventloop.rs b/src/interactive/app/eventloop.rs index 7333678..6ed3c61 100644 --- a/src/interactive/app/eventloop.rs +++ b/src/interactive/app/eventloop.rs @@ -77,7 +77,7 @@ impl AppState { use crosstermion::input::Key::*; use FocussedPane::*; - self.draw(window, traversal, display.clone(), terminal)?; + self.draw(window, traversal, *display, terminal)?; for key in keys { self.reset_message(); match key { @@ -107,7 +107,7 @@ impl AppState { match self.focussed { FocussedPane::Mark => { - self.dispatch_to_mark_pane(key, window, traversal, display.clone(), terminal) + self.dispatch_to_mark_pane(key, window, traversal, *display, terminal) } FocussedPane::Help => { window.help_pane.as_mut().expect("help pane").key(key); @@ -147,7 +147,7 @@ impl AppState { _ => {} }, }; - self.draw(window, traversal, display.clone(), terminal)?; + self.draw(window, traversal, *display, terminal)?; } Ok(ProcessingResult::Finished(WalkResult { num_errors: traversal.io_errors, diff --git a/src/interactive/widgets/help.rs b/src/interactive/widgets/help.rs index 7ab556e..de0dd1b 100644 --- a/src/interactive/widgets/help.rs +++ b/src/interactive/widgets/help.rs @@ -56,9 +56,9 @@ impl HelpPane { }; let spacer = || add_newlines(2); - let title = |name| { + let title = |name: &str| { lines.borrow_mut().push(Spans::from(Span::styled( - format!("{}", name), + name.to_string(), Style { add_modifier: Modifier::BOLD | Modifier::UNDERLINED, ..Default::default() diff --git a/src/interactive/widgets/mark.rs b/src/interactive/widgets/mark.rs index 8ba8e8c..cdae961 100644 --- a/src/interactive/widgets/mark.rs +++ b/src/interactive/widgets/mark.rs @@ -301,7 +301,7 @@ impl MarkPane { .saturating_sub(format.total_width()) ), Style { - fg: fg_path.into(), + fg: fg_path, ..base_style }, ); diff --git a/src/main.rs b/src/main.rs index 4c0edc2..09d5704 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,8 @@ #![forbid(unsafe_code)] -#![allow(clippy::match_bool)] use anyhow::{anyhow, Result}; use dua::{ByteFormat, TraversalSorting}; use std::{fs, io, io::Write, path::PathBuf, process}; use structopt::StructOpt; -use wild; #[cfg(any(feature = "tui-unix", feature = "tui-crossplatform"))] mod interactive; |