chore: clippy + fmt
This commit is contained in:
@ -385,7 +385,6 @@ impl App {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
fn handle_wizard_key(&mut self, key: KeyEvent) -> Result<()> {
|
||||
if let Some(wizard) = &mut self.wizard {
|
||||
match &wizard.step.clone() {
|
||||
@ -536,7 +535,7 @@ impl App {
|
||||
AppMode::CategoryAdd { .. } => "Enter:add & continue Tab:same Esc:done — type a category name",
|
||||
AppMode::ItemAdd { .. } => "Enter:add & continue Tab:same Esc:done — type an item name",
|
||||
AppMode::ViewPanel => "jk:nav Enter:switch n:new d:delete Esc:back",
|
||||
AppMode::TileSelect { .. } => "hl:select Enter:cycle r/c/p/n:set-axis Esc:back",
|
||||
AppMode::TileSelect => "hl:select Enter:cycle r/c/p/n:set-axis Esc:back",
|
||||
AppMode::CommandMode { .. } => ":q quit :w save :import :add-cat :formula :show-item :help",
|
||||
AppMode::ImportWizard => "Space:toggle c:cycle Enter:next Esc:cancel",
|
||||
_ => "",
|
||||
|
||||
@ -26,7 +26,11 @@ pub struct TileBar<'a> {
|
||||
|
||||
impl<'a> TileBar<'a> {
|
||||
pub fn new(model: &'a Model, mode: &'a AppMode, tile_cat_idx: usize) -> Self {
|
||||
Self { model, mode, tile_cat_idx }
|
||||
Self {
|
||||
model,
|
||||
mode,
|
||||
tile_cat_idx,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +71,7 @@ impl<'a> Widget for TileBar<'a> {
|
||||
}
|
||||
|
||||
// Hint
|
||||
if matches!(self.mode, AppMode::TileSelect { .. }) {
|
||||
if matches!(self.mode, AppMode::TileSelect) {
|
||||
let hint = " [Enter] cycle axis [r/c/p] set axis [←→] select [Esc] cancel";
|
||||
if x + hint.len() as u16 <= area.x + area.width {
|
||||
buf.set_string(x, area.y, hint, Style::default().fg(Color::DarkGray));
|
||||
|
||||
Reference in New Issue
Block a user