fix 'attempted to subtract with overflow' for State::inactives (#1668)

This commit is contained in:
Jakob Hellermann 2021-04-10 16:33:35 +00:00
parent 6a4051be3a
commit ed36c21e7e

View file

@ -378,7 +378,7 @@ where
}
pub fn inactives(&self) -> &[T] {
&self.stack[0..self.stack.len() - 2]
self.stack.split_last().map(|(_, rest)| rest).unwrap()
}
}