add check in prompt_confirmation_menu to make sure confirmations is not empty
This commit is contained in:
parent
980a14deb1
commit
0d90792c47
1 changed files with 4 additions and 0 deletions
|
@ -125,6 +125,10 @@ where
|
||||||
pub(crate) fn prompt_confirmation_menu(
|
pub(crate) fn prompt_confirmation_menu(
|
||||||
confirmations: Vec<Confirmation>,
|
confirmations: Vec<Confirmation>,
|
||||||
) -> anyhow::Result<(Vec<Confirmation>, Vec<Confirmation>)> {
|
) -> anyhow::Result<(Vec<Confirmation>, Vec<Confirmation>)> {
|
||||||
|
if confirmations.len() == 0 {
|
||||||
|
bail!("no confirmations")
|
||||||
|
}
|
||||||
|
|
||||||
let mut to_accept_idx: HashSet<usize> = HashSet::new();
|
let mut to_accept_idx: HashSet<usize> = HashSet::new();
|
||||||
let mut to_deny_idx: HashSet<usize> = HashSet::new();
|
let mut to_deny_idx: HashSet<usize> = HashSet::new();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue