jordanbray / chess

A rust library to manage chess move generation

Home Page:https://jordanbray.github.io/chess/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error for the first example in README.md

SnowballSH opened this issue · comments

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?

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