Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiyaa committed Sep 25, 2021
1 parent cbfdb2c commit 4165d4f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/commands/key_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ impl std::str::FromStr for KeyCommand {
}
}
Ok(Self::ShowWorkers(exit_key))
},
}
Err(e) => Err(JoshutoError::new(
JoshutoErrorKind::InvalidParameters,
format!("{}: {}", arg, e),
)),
}
},
"sort" => match arg {
"reverse" => Ok(Self::SortReverse),
arg => match SortType::parse(arg) {
Expand Down
6 changes: 5 additions & 1 deletion src/commands/show_workers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ use crate::error::JoshutoResult;
use crate::ui::views::TuiWorkerView;
use crate::ui::TuiBackend;

pub fn show_workers(context: &mut AppContext, backend: &mut TuiBackend, exit_key: &Key) -> JoshutoResult<()> {
pub fn show_workers(
context: &mut AppContext,
backend: &mut TuiBackend,
exit_key: &Key,
) -> JoshutoResult<()> {
context.flush_event();

let view = TuiWorkerView::new(exit_key.clone());
Expand Down
2 changes: 1 addition & 1 deletion src/config/keymap/keymapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use std::str::FromStr;
use termion::event::MouseEvent;
use termion::event::{Event, Key};

use crate::util::keyparse::str_to_event;
use crate::commands::{CommandKeybind, KeyCommand};
use crate::config::{parse_to_config_file, ConfigStructure, Flattenable};
use crate::io::IoWorkerOptions;
use crate::util::keyparse::str_to_event;

#[derive(Debug, Deserialize)]
struct CommandKeymap {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/views/tui_worker_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl TuiWorkerView {
match event {
Event::Key(Key::Esc) => break,
Event::Key(k) if k == self.exit_key => break,
_ => {},
_ => {}
}
context.flush_event();
}
Expand Down

0 comments on commit 4165d4f

Please sign in to comment.