simplify update_from_board checking of current_root
This commit is contained in:
parent
65ac509fa4
commit
6a00560a8a
@ -250,10 +250,9 @@ impl FutureMoves {
|
||||
.arena
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, m)| {
|
||||
&m.board == board && (m.parent == self.current_root) && self.current_root.is_some()
|
||||
})
|
||||
.map(|(idx, _)| idx);
|
||||
.find(|(_, m)| &m.board == board && (m.parent == self.current_root))
|
||||
.map(|(idx, _)| idx)
|
||||
.filter(|_| self.current_root.is_some());
|
||||
|
||||
if let Some(curr_board_idx) = curr_board {
|
||||
self.set_root_idx_raw(curr_board_idx);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user