Skip to content

Commit

Permalink
cargo fmt pass
Browse files Browse the repository at this point in the history
  • Loading branch information
wegreenall committed Mar 18, 2024
1 parent a42029d commit 88a75f4
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 207 deletions.
4 changes: 2 additions & 2 deletions inquire/src/prompts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ mod custom_type;
mod dateselect;
#[cfg(feature = "editor")]
mod editor;
mod multiselect;
mod multicount;
mod multiselect;
mod one_liners;
mod password;
mod prompt;
Expand All @@ -22,8 +22,8 @@ pub use custom_type::*;
pub use dateselect::*;
#[cfg(feature = "editor")]
pub use editor::*;
pub use multiselect::*;
pub use multicount::*;
pub use multiselect::*;
#[cfg(feature = "one-liners")]
pub use one_liners::*;
pub use password::*;
Expand Down
14 changes: 8 additions & 6 deletions inquire/src/prompts/multicount/action.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use crate::{ui::{Key, KeyModifiers}, InnerAction, InputAction};
use crate::{
ui::{Key, KeyModifiers},
InnerAction, InputAction,
};

use super::config::MultiCountConfig;

/// Set of actions for a MultiCountPrompt.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum MultiCountPromptAction{
pub enum MultiCountPromptAction {
/// Action on the value text input handler.
FilterInput(InputAction),
/// Moves the cursor to the option above.
Expand All @@ -20,7 +23,7 @@ pub enum MultiCountPromptAction{
/// Moves the cursor to the end of the list.
MoveToEnd,
/// Toggles the selection of the current option.
SetCountCurrentOption(u32),
SetCountCurrentOption(u32),
/// Increments the current selection by one
Increment,
/// Decrements the current selection by one
Expand Down Expand Up @@ -49,7 +52,6 @@ impl InnerAction for MultiCountPromptAction {
return action;
}
}


let action = match key {
Key::Up(KeyModifiers::NONE) | Key::Char('p', KeyModifiers::CONTROL) => Self::MoveUp,
Expand All @@ -69,7 +71,7 @@ impl InnerAction for MultiCountPromptAction {
Some(action) => Self::FilterInput(action),
None => return None,
},
};
Some(action)
};
Some(action)
}
}
20 changes: 10 additions & 10 deletions inquire/src/prompts/multicount/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ pub use action::*;
use std::fmt::Display;

use crate::{
config::get_configuration,
error::{InquireError, InquireResult},
formatter::MultiCountFormatter,
list_option::ListOption,
prompts::prompt::Prompt,
terminal::get_default_terminal,
type_aliases::Scorer,
ui::{Backend, MultiCountBackend, RenderConfig},
validator::MultiOptionValidator,
};
config::get_configuration,
error::{InquireError, InquireResult},
formatter::MultiCountFormatter,
list_option::ListOption,
prompts::prompt::Prompt,
terminal::get_default_terminal,
type_aliases::Scorer,
ui::{Backend, MultiCountBackend, RenderConfig},
validator::MultiOptionValidator,
};

use self::prompt::MultiCountPrompt;

Expand Down
Loading

0 comments on commit 88a75f4

Please sign in to comment.