Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SnowballSH opened this issue Apr 1, 2021 · 1 comment
Open

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

SnowballSH opened this issue Apr 1, 2021 · 1 comment

Comments

@SnowballSH
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant