diff options
author | quentin konieczko <konieczko@gmail.com> | 2023-04-12 12:55:10 +0200 |
---|---|---|
committer | quentin konieczko <konieczko@gmail.com> | 2023-04-12 12:59:03 +0200 |
commit | 50b0c99f049b50d41a710ee52eea4393d286223e (patch) | |
tree | d9e341c7959f9218d6eff88767ab8f37e515779c /src/mode.rs | |
parent | 2cc19620ea274ce3b92cd557e4aeb91df1257f72 (diff) |
almost there, still crashing
Diffstat (limited to 'src/mode.rs')
-rw-r--r-- | src/mode.rs | 13 |
1 files changed, 4 insertions, 9 deletions
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<BlockDeviceAction>, - PasswordUsage, - Option<String>, - ), + Password(PasswordKind, Option<BlockDeviceAction>, 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: "), |