improve lifetime annotation in bot

This commit is contained in:
tali 2023-04-12 15:47:32 -04:00
parent 501c333048
commit 6d1ced46e4
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ impl SegmentedAStar {
}
}
fn expand(&mut self, arena: &Arena) -> Result<&Node, ShouldSelect> {
fn expand<'a>(&mut self, arena: &'a Arena) -> Result<&'a Node, ShouldSelect> {
let open_set = self.open.get_mut(self.depth);
let cand = open_set.map_or(None, |set| set.pop()).ok_or(ShouldSelect)?;
let cand = unsafe { cand.0.as_node() };