Skip to content

Commit 80f243e

Browse files
committed
fix missed write!s
1 parent 8f6cb0d commit 80f243e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/gen_tables/pawns.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,27 +101,27 @@ pub fn write_pawn_moves(f: &mut File) {
101101

102102
// Write the PAWN_ATTACKS array to the specified file.
103103
pub fn write_pawn_attacks(f: &mut File) {
104-
write!(f, "const PAWN_ATTACKS: [[BitBoard; 64]; 2] = [[\n").unwrap();
104+
writeln!(f, "const PAWN_ATTACKS: [[BitBoard; 64]; 2] = [[").unwrap();
105105
for i in 0..2 {
106106
for j in 0..64 {
107-
unsafe { write!(f, " BitBoard({}),\n", PAWN_ATTACKS[i][j].0).unwrap() };
107+
unsafe { writeln!(f, " BitBoard({}),", PAWN_ATTACKS[i][j].0).unwrap() };
108108
}
109109
if i != 1 {
110-
write!(f, " ], [\n").unwrap();
110+
writeln!(f, " ], [").unwrap();
111111
}
112112
}
113-
write!(f, "]];\n").unwrap();
113+
writeln!(f, "]];").unwrap();
114114

115-
write!(
115+
writeln!(
116116
f,
117-
"const PAWN_SOURCE_DOUBLE_MOVES: BitBoard = BitBoard({0});\n",
117+
"const PAWN_SOURCE_DOUBLE_MOVES: BitBoard = BitBoard({0});",
118118
gen_source_double_moves().0
119119
)
120120
.unwrap();
121121

122-
write!(
122+
writeln!(
123123
f,
124-
"const PAWN_DEST_DOUBLE_MOVES: BitBoard = BitBoard({0});\n",
124+
"const PAWN_DEST_DOUBLE_MOVES: BitBoard = BitBoard({0});",
125125
gen_dest_double_moves().0
126126
)
127127
.unwrap();

0 commit comments

Comments
 (0)