Skip to content

Commit 5652190

Browse files
committed
Fixed pub(crate) compile error
1 parent df4b8da commit 5652190

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/algorithms/eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn eval_no_legal_moves(board: &Board) -> f32 {
1616
f32::MAX
1717
};
1818
}
19-
pub fn new_eval_is_better(maximise: bool, old: &Evaluation, new: &Evaluation) -> bool {
19+
pub(crate) fn new_eval_is_better(maximise: bool, old: &Evaluation, new: &Evaluation) -> bool {
2020
new.eval.is_some()
2121
&& (old.eval.is_none()
2222
|| maximise && new.eval.unwrap() > old.eval.unwrap()

src/modules/transposition_table.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ use crate::common::utils::Stats;
99
#[derive(Debug, Copy, Clone)]
1010
pub struct TranspositionEntry {
1111
pub depth: u32,
12-
pub evaluation: Evaluation,
12+
pub(crate) evaluation: Evaluation,
1313
}
1414

1515
impl TranspositionEntry {
16-
pub fn new(depth: u32, evaluation: Evaluation) -> Self {
16+
pub(crate) fn new(depth: u32, evaluation: Evaluation) -> Self {
1717
TranspositionEntry { depth, evaluation }
1818
}
1919
}
2020

21-
pub fn insert_in_transposition_table(
21+
pub(crate) fn insert_in_transposition_table(
2222
transposition_table: &mut HashMap<Board, TranspositionEntry>,
2323
board: &Board,
2424
depth: u32,
@@ -31,7 +31,7 @@ pub fn insert_in_transposition_table(
3131
stats.transposition_table_entries += 1
3232
}
3333

34-
pub fn get_transposition_entry(
34+
pub(crate) fn get_transposition_entry(
3535
transposition_table: &HashMap<Board, TranspositionEntry>,
3636
stats: &mut Stats,
3737
board: &Board,

0 commit comments

Comments
 (0)