Use unreachable instead of panic

This commit is contained in:
Khalid Ali 2021-09-05 18:13:20 -05:00
parent a0b78ffd16
commit cbc6cdfad1

View File

@ -1858,7 +1858,7 @@ impl<'a> AgentData<'a> {
let direction_weight = match tactic { let direction_weight = match tactic {
Tactic::Hammer => 0.1, Tactic::Hammer => 0.1,
Tactic::Axe => 0.3, Tactic::Axe => 0.3,
_ => panic!("Direction weight called on unknown tactic."), _ => unreachable!("Direction weight called on incorrect tactic."),
}; };
let tgt_pos = tgt_data.pos.0; let tgt_pos = tgt_data.pos.0;