From 50b0c99f049b50d41a710ee52eea4393d286223e Mon Sep 17 00:00:00 2001 From: quentin konieczko Date: Wed, 12 Apr 2023 12:55:10 +0200 Subject: almost there, still crashing --- src/mode.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/mode.rs') diff --git a/src/mode.rs b/src/mode.rs index fad65f6..ac6ba7d 100644 --- a/src/mode.rs +++ b/src/mode.rs @@ -59,7 +59,7 @@ impl std::fmt::Display for NeedConfirmation { /// the name of a new file, of a new directory, /// A regex to match all files in current directory, /// a kind of sort, a mark name, a new mark or a filter. -#[derive(Clone)] +#[derive(Clone, Copy)] pub enum InputSimple { /// Rename the selected file Rename, @@ -78,12 +78,7 @@ pub enum InputSimple { /// Set a new neovim RPC address SetNvimAddr, /// Input a password (chars a replaced by *) - Password( - PasswordKind, - Option, - PasswordUsage, - Option, - ), + Password(PasswordKind, Option, PasswordUsage), /// Shell command execute as is Shell, } @@ -116,7 +111,7 @@ pub enum Navigate { /// Different mode in which the application can be. /// It dictates the reaction to event and what to display. -#[derive(Clone)] +#[derive(Clone, Copy)] pub enum Mode { /// Default mode: display the files Normal, @@ -152,7 +147,7 @@ impl fmt::Display for Mode { write!(f, "Sort: Kind Name Modif Size Ext Rev :") } Mode::InputSimple(InputSimple::Filter) => write!(f, "Filter: "), - Mode::InputSimple(InputSimple::Password(password_kind, _, _, _)) => { + Mode::InputSimple(InputSimple::Password(password_kind, _, _)) => { write!(f, "{password_kind}") } Mode::InputCompleted(InputCompleted::Exec) => write!(f, "Exec: "), -- cgit v1.2.3