jordanbray / chess

A rust library to manage chess move generation
https://jordanbray.github.io/chess/
MIT License
231 stars 54 forks source link

Build error for the first example in README.md #50

Open SnowballSH opened 3 years ago

SnowballSH commented 3 years ago

For the first example in README.md, we have this code:

// lets iterate over targets.
let targets = board.color_combined(!board.side_to_move());
iterable.set_iterator_mask(targets);

Notice that the target should be a &BitBoard type. However, set_iterator_mask accepts mask: BitBoard which is not a pointer. Therefore, building the project gives me this error:

mismatched types [E0308] expected `BitBoard`, found `&BitBoard` 

If I dereference target using *, it works. Can you recheck if the example is correct?

SnowballSH commented 3 years ago

Chess crate version: 3.2.0 Cargo version: 1.50.0 OS: Windows 10 64 bit AMD64