// Used by Parser to test whether the top-most element is an index.
fn last_is_index(&self) -> bool {
- if let Some(InternalIndex(_)) = self.stack.last() {
- true
- } else {
- false
+ match self.stack.last() {
+ Some(InternalIndex(_)) => true,
+ _ => false,
}
}