use LazyLock instead of lazy_static
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use super::board_value::BoardValueMap;
|
||||
use crate::repr::{Board, CoordPair, Piece, Winner};
|
||||
use lazy_static::lazy_static;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Move {
|
||||
@@ -35,9 +35,7 @@ pub struct Move {
|
||||
pub is_trimmed: bool,
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref BVM: BoardValueMap = BoardValueMap::new();
|
||||
}
|
||||
static BVM: LazyLock<BoardValueMap> = LazyLock::new(|| BoardValueMap::new());
|
||||
|
||||
impl Move {
|
||||
pub fn new(coord: Option<CoordPair>, board: Board, color: Piece, agent_color: Piece) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user