Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Mar 30, 2020
1 parent f3505ec commit 70b043a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/interactive/app/eventloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ pub struct TerminalApp {
pub window: MainWindow,
}

type KeyboardInputAndApp = (flume::Receiver<io::Result<Key>>, TerminalApp);

impl TerminalApp {
pub fn process_events<B>(
&mut self,
Expand All @@ -185,7 +187,7 @@ impl TerminalApp {
options: WalkOptions,
input: Vec<PathBuf>,
mode: Interaction,
) -> Result<Option<(flume::Receiver<io::Result<Key>>, TerminalApp)>, Error>
) -> Result<Option<KeyboardInputAndApp>, Error>
where
B: Backend,
{
Expand All @@ -200,7 +202,7 @@ impl TerminalApp {
Interaction::Full => drop(std::thread::spawn(move || {
let keys = std::io::stdin().keys();
for key in keys {
if let Err(_) = keys_tx.send(key) {
if keys_tx.send(key).is_err() {
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/interactive/widgets/footer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Footer {
format!(
" Total disk usage: {} Entries: {} ",
match total_bytes {
Some(b) => format!("{}", format.display(*b)).to_owned(),
Some(b) => format!("{}", format.display(*b)),
None => "-".to_owned(),
},
entries_traversed,
Expand Down

0 comments on commit 70b043a

Please sign in to comment.