Prevent invalid state in next_task_menu
This commit is contained in:
parent
10e4fb328c
commit
69b8993d4d
|
@ -961,6 +961,11 @@ What's the progress?",
|
|||
}
|
||||
(Select::T(_), State::Promote, Some(High)) |
|
||||
(Select::T(_), State::Demote, None) => bail!("Impossible state change"),
|
||||
(Select::P(new_prio @ Some(High)), State::Promote, _) |
|
||||
(Select::P(new_prio @ None), State::Demote, _) => {
|
||||
prio = new_prio;
|
||||
state = State::Pick
|
||||
}
|
||||
(Select::P(new_prio), _, _) => prio = new_prio,
|
||||
}
|
||||
self.cache.write()?;
|
||||
|
|
Loading…
Reference in a new issue