chessfriend/bitboard/src
Eryn Wells 4b148529a1 [bitboard] Fix the warning about shared references to mutable static data
I've lived with this warning for a long time because I didn't really understand
it.

```
warning: `chessfriend_core` (lib) generated 1 warning (run `cargo fix --lib -p chessfriend_core` to apply 1 suggestion)
warning: creating a shared reference to mutable static is discouraged
  --> bitboard/src/library.rs:66:9
```

I was able to fix this by creating a new type with a single OnceLock attribute.
The OnceLock acts as a cell, making it mutable, even if self is not. So, you can
declare the MoveLibraryWrapper non-mutable static, but still initialize the
library inside the Cell.
2025-06-08 17:34:42 -07:00
..
bit_scanner.rs [bitboard, board, core, moves] Implement SliderMoveGenerator 2025-05-26 17:41:43 -07:00
bitboard.rs [board, core, bitboard] Clean up casts between Rank, File and BitBoard 2025-05-23 18:32:18 -07:00
direction.rs [bitboard] Replace separate methods for leading and trailing iteration 2025-05-02 14:28:31 -07:00
lib.rs [bitboard] Export the bit_scanner module 2025-05-23 18:38:15 -07:00
library.rs [bitboard] Fix the warning about shared references to mutable static data 2025-06-08 17:34:42 -07:00
shifts.rs [bitboard] Add separators to the NOT_A_FILE and NOT_H_FILE constants 2025-05-16 07:44:59 -07:00