Skip to content

Commit

Permalink
Add panic on impossible branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mroik committed May 10, 2024
1 parent b8e87b7 commit 781ec13
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ impl App {
| State::OrState(OrState::EliminateGetAssumption) => {
("And expression to eliminate", true)
}
State::AndState(AndState::EliminateGetProposition(_)) => {
("Resulting expression", true)
}
State::AndState(AndState::EliminateGetProposition(_)) => ("Resulting expression", true),
State::OrState(OrState::EliminateGetLeftSubproof(_))
| State::OrState(OrState::EliminateGetRightSubproof(_, _))
| State::ImpliesState(ImpliesState::Introduce)
Expand Down Expand Up @@ -177,7 +175,7 @@ impl App {
}
}
}
_ => (),
_ => unreachable!(),
};
self.handle_expression_box_event(code, handler);
}
Expand Down Expand Up @@ -234,7 +232,7 @@ impl App {
}
}
}
_ => (),
_ => unreachable!(),
};
self.handle_expression_box_event(code, handler);
}
Expand Down Expand Up @@ -275,7 +273,7 @@ impl App {
app_context.reset_expression_box();
}
},
_ => (),
_ => unreachable!(),
};
self.handle_expression_box_event(code, handler);
}
Expand Down Expand Up @@ -377,7 +375,7 @@ impl App {
}
}
}
_ => (),
_ => unreachable!(),
};
self.handle_expression_box_event(code, handler);
}
Expand Down Expand Up @@ -537,7 +535,7 @@ impl App {
self.state = State::ImpliesState(ImpliesState::EliminateGetAssumption)
}
KeyCode::Char('f') => self.state = State::IffState(IffState::EliminateGetAssumption),
_ => (),
_ => unreachable!(),
}
}

Expand Down

0 comments on commit 781ec13

Please sign in to comment.