fix: make pull_trunk pull from the trunk, rather than the root
This commit is contained in:
parent
ca66fbc895
commit
cb693c16e7
|
@ -136,14 +136,14 @@ impl Tree {
|
|||
pub fn pull_root(&mut self) -> u16 {
|
||||
match self.root.pop() {
|
||||
Some(v) => v,
|
||||
None => panic!("Cannot pop from empty root stack in {}", self.rule_id)
|
||||
None => panic!("Cannot pop from empty root stack in rule #{}", self.rule_id)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pull_trunk(&mut self) -> u16 {
|
||||
match self.root.pop() {
|
||||
match self.trunk.pop() {
|
||||
Some(v) => v,
|
||||
None => panic!("Cannot pop from empty trunk stack in {}", self.rule_id)
|
||||
None => panic!("Cannot pop from empty trunk stack in rule #{}", self.rule_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue