fix 'attempted to subtract with overflow' for State::inactives (#1668)
This commit is contained in:
parent
6a4051be3a
commit
ed36c21e7e
@ -378,7 +378,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn inactives(&self) -> &[T] {
|
pub fn inactives(&self) -> &[T] {
|
||||||
&self.stack[0..self.stack.len() - 2]
|
self.stack.split_last().map(|(_, rest)| rest).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user