Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
  • Loading branch information
Mephistophiles committed Jul 23, 2020
1 parent 04b9e52 commit 292c4d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/interactive/app/eventloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/interactive/widgets/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/interactive/widgets/mark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl MarkPane {
.saturating_sub(format.total_width())
),
Style {
fg: fg_path.into(),
fg: fg_path,
..base_style
},
);
Expand Down
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 292c4d3

Please sign in to comment.