INDAPlus21 / INDAPlus21/eliasfl-chess
Pass
- Dominant language
- Rust
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**Superbra jobbat!!!**
However, I failed to compile both your library and application. I judge this to be a case of "but it works on my machine".
```rust
error[E0277]: `[({integer}, {integer}); 4]` is not an iterator
--> src\lib.rs:165:45
|
165 | for (file_dir, rank_dir) in directions {
| ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, {integer}); 4]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, {integer}); 4]`
= note: required by `into_iter`
error[E0277]: `[({integer}, {integer}); 4]` is not an iterator
--> src\lib.rs:165:45
|
165 | for (file_dir, rank_dir) in directions {
| ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, {integer}); 4]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, {integer}); 4]`
= note: required by `into_iter`
error[E0277]: `[({integer}, {integer}); 8]` is not an iterator
--> src\lib.rs:186:51
|
186 | for (file_offset, rank_offset) in offsets {
| ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, {integer}); 8]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, {integer}); 8]`
= note: required by `into_iter`
error[E0277]: `[({integer}, {integer}); 8]` is not an iterator
--> src\lib.rs:186:51
|
186 | for (file_offset, rank_offset) in offsets {
| ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, {integer}); 8]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, {integer}); 8]`
= note: required by `into_iter`
error[E0277]: `[{integer}; 2]` is not an iterator
--> src\lib.rs:202:36
|
202 | for file_offset in [-1, 1] {
| ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[{integer}; 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[{integer}; 2]`
= note: required by `into_iter`
error[E0277]: `[{integer}; 2]` is not an iterator
--> src\lib.rs:202:36
|
202 | for file_offset in [-1, 1] {
| ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[{integer}; 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[{integer}; 2]`
= note: required by `into_iter`
error[E0277]: `[({integer}, Color); 2]` is not an iterator
--> src\lib.rs:305:27
|
305 | for (r, color) in [(1, White), (8, Black)] {
| ^^^^^^^^^^^^^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, Color); 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, Color); 2]`
= note: required by `into_iter`
error[E0277]: `[({integer}, Color); 2]` is not an iterator
--> src\lib.rs:305:27
|
305 | for (r, color) in [(1, White), (8, Black)] {
| ^^^^^^^^^^^^^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, Color); 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, Color); 2]`
= note: required by `into_iter`
error[E0277]: `[({integer}, Color); 2]` is not an iterator
--> src\lib.rs:329:27
|
329 | for (r, color) in [(2, White), (7, Black)] {
| ^^^^^^^^^^^^^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, Color); 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, Color); 2]`
= note: required by `into_iter`
error[E0277]: `[({integer}, Color); 2]` is not an iterator
--> src\lib.rs:329:27
|
329 | for (r, color) in [(2, White), (7, Black)] {
| ^^^^^^^^^^^^^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[({integer}, Color); 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[({integer}, Color); 2]`
= note: required by `into_iter`
error[E0277]: `[(&str, &str); 9]` is not an iterator
--> src\tests.rs:106:27
|
106 | for (from, to) in moves {
| ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[(&str, &str); 9]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[(&str, &str); 9]`
= note: required by `into_iter`
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0277`.
error[E0277]: `[(&str, &str); 4]` is not an iterator
--> src\tests.rs:173:27
|
173 | for (from, to) in moves {
| ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[(&str, &str); 4]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[(&str, &str); 4]`
= note: required by `into_iter`
error[E0277]: `[(&str, &str); 7]` is not an iterator
--> src\tests.rs:192:27
|
192 | for (from, to) in moves {
| ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[(&str, &str); 7]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[(&str, &str); 7]`
= note: required by `into_iter`
error: could not compile `eliasfl-chess`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: aborting due to 8 previous errors
For more information about this error, try `rustc --explain E0277`.
error: build failed
```
```rust
error[E0277]: `[(&str, &str); 12]` is not an iterator
--> src\main.rs:32:31
|
32 | for (from, to) in ASCII_SYMBOLS {
| ^^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[(&str, &str); 12]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[(&str, &str); 12]`
= note: required by `into_iter`
error: aborting due to previous error
```
Your application is great, and has some potential. For example can character and numerical values easly be converted with arithmetics, rather than with `match` statements.
Great doc-comments!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the array-based for loops reported in src/lib.rs, src/tests.rs, and src/main.rs, beginning at the listed line numbers. Run the project build and tests to reproduce the E0277 errors, then verify that the library, tests, and CLI compile successfully without changing chess behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100