Skip to content

ci: Bump MSRV

ci: Bump MSRV #233

Triggered via push May 17, 2024 19:57
Status Failure
Total duration 3m 48s
Artifacts

coverage.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 57 warnings
transmute used without annotations: src/chess/core.rs#L317
error: transmute used without annotations --> src/chess/core.rs:317:39 | 317 | 0..=7 => Ok(unsafe { mem::transmute(row) }), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, chess::core::Rank>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
transmute used without annotations: src/chess/core.rs#L306
error: transmute used without annotations --> src/chess/core.rs:306:43 | 306 | '1'..='8' => Ok(unsafe { mem::transmute(rank as u8 - b'1') }), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, chess::core::Rank>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
transmute used without annotations: src/chess/core.rs#L247
error: transmute used without annotations --> src/chess/core.rs:247:39 | 247 | 0..=7 => Ok(unsafe { mem::transmute(column) }), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, chess::core::File>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
transmute used without annotations: src/chess/core.rs#L236
error: transmute used without annotations --> src/chess/core.rs:236:43 | 236 | 'a'..='h' => Ok(unsafe { mem::transmute(file as u8 - b'a') }), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, chess::core::File>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
transmute used without annotations: src/chess/core.rs#L179
error: transmute used without annotations --> src/chess/core.rs:179:47 | 179 | 0..=MAX_INDEX => Ok(unsafe { mem::transmute(square_index) }), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<i8, chess::core::Square>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
transmute used without annotations: src/chess/core.rs#L160
error: transmute used without annotations --> src/chess/core.rs:160:47 | 160 | 0..=MAX_INDEX => Ok(unsafe { mem::transmute(square_index) }), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, chess::core::Square>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
transmute used without annotations: src/chess/bitboard.rs#L296
error: transmute used without annotations --> src/chess/bitboard.rs:296:26 | 296 | Ok(unsafe { mem::transmute(self.bits.trailing_zeros() as u8) }) | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, chess::core::Square>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
transmute used without annotations: src/chess/bitboard.rs#L276
error: transmute used without annotations --> src/chess/bitboard.rs:276:28 | 276 | Some(unsafe { mem::transmute(next_index as u8) }) | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, chess::core::Square>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations = note: `-D clippy::missing-transmute-annotations` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::missing_transmute_annotations)]`
Test Coverage
Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1
missing documentation for a function: src/util.rs#L6
warning: missing documentation for a function --> src/util.rs:6:1 | 6 | pub fn sanitize_fen(position: &str) -> String { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for a module: src/interface.rs#L3
warning: missing documentation for a module --> src/interface.rs:3:1 | 3 | pub mod uci; | ^^^^^^^^^^^
missing documentation for a trait: src/evaluation/evaluator.rs#L1
warning: missing documentation for a trait --> src/evaluation/evaluator.rs:1:1 | 1 | pub trait Evaluator {} | ^^^^^^^^^^^^^^^^^^^
missing documentation for a module: src/evaluation.rs#L1
warning: missing documentation for a module --> src/evaluation.rs:1:1 | 1 | pub mod evaluator; | ^^^^^^^^^^^^^^^^^
missing documentation for a method: src/chess/position.rs#L417
warning: missing documentation for a method --> src/chess/position.rs:417:5 | 417 | pub fn make_move(&mut self, next_move: &Move) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for a method: src/chess/position.rs#L275
warning: missing documentation for a method --> src/chess/position.rs:275:5 | 275 | pub fn is_legal(&self) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for a method: src/chess/position.rs#L270
warning: missing documentation for a method --> src/chess/position.rs:270:5 | 270 | pub fn has_insufficient_material(&self) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for a method: src/chess/core.rs#L134
warning: missing documentation for a method --> src/chess/core.rs:134:5 | 134 | pub fn shift(self, direction: Direction) -> Option<Self> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for an associated function: src/chess/core.rs#L49
warning: missing documentation for an associated function --> src/chess/core.rs:49:5 | 49 | pub fn from_san(_position: &Position) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for an associated function: src/chess/core.rs#L40
warning: missing documentation for an associated function --> src/chess/core.rs:40:5 | 40 | pub const fn new(from: Square, to: Square, promotion: Option<Promotion>) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for a constant: src/lib.rs#L57
warning: missing documentation for a constant --> src/lib.rs:57:1 | 57 | pub const VERSION: &str = include_str!(concat!(env!("OUT_DIR"), "/version")); | ^^^^^^^^^^^^^^^^^^^^^^^
missing documentation for a module: src/lib.rs#L50
warning: missing documentation for a module --> src/lib.rs:50:1 | 50 | pub mod evaluation; | ^^^^^^^^^^^^^^^^^^ | note: the lint level is defined here --> src/lib.rs:11:9 | 11 | #![warn(missing_docs, variant_size_differences)] | ^^^^^^^^^^^^
variables can be used directly in the `format!` string: src/interface/uci.rs#L62
warning: variables can be used directly in the `format!` string --> src/interface/uci.rs:62:17 | 62 | println!("Unknown command: {}", input); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 62 - println!("Unknown command: {}", input); 62 + println!("Unknown command: {input}"); |
the loop variable `i` is only used to index `tokens`: src/interface/uci.rs#L44
warning: the loop variable `i` is only used to index `tokens` --> src/interface/uci.rs:44:30 | 44 | for i in 3..tokens.len() { | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop note: the lint level is defined here --> src/lib.rs:41:5 | 41 | clippy::style, | ^^^^^^^^^^^^^ = note: `#[warn(clippy::needless_range_loop)]` implied by `#[warn(clippy::style)]` help: consider using an iterator | 44 | for <item> in tokens.iter().skip(3) { | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
indexing into a vector may panic: src/interface/uci.rs#L11
warning: indexing into a vector may panic --> src/interface/uci.rs:11:15 | 11 | match tokens[0] { | ^^^^^^^^^ help: try: `tokens.get(0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_on_vec_items = note: `#[warn(clippy::match_on_vec_items)]` implied by `#[warn(clippy::pedantic)]`
this match arm has an identical body to another arm: src/interface/uci.rs#L29
warning: this match arm has an identical body to another arm --> src/interface/uci.rs:29:13 | 29 | "setoption" => { | ^---------- | | | _____________help: try merging the arm patterns: `"setoption" | "ucinewgame"` | | 30 | | // Handle engine options 31 | | }, | |_____________^ | = help: or try changing either arm body note: other arm here --> src/interface/uci.rs:32:13 | 32 | / "ucinewgame" => { 33 | | // Handle new game setup 34 | | }, | |_____________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
this match arm has an identical body to another arm: src/interface/uci.rs#L22
warning: this match arm has an identical body to another arm --> src/interface/uci.rs:22:13 | 22 | "debug" => { | ^------ | | | _____________help: try merging the arm patterns: `"debug" | "ucinewgame"` | | 23 | | // Handle debug mode 24 | | }, | |_____________^ | = help: or try changing either arm body note: other arm here --> src/interface/uci.rs:32:13 | 32 | / "ucinewgame" => { 33 | | // Handle new game setup 34 | | }, | |_____________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
this match arm has an identical body to another arm: src/interface/uci.rs#L22
warning: this match arm has an identical body to another arm --> src/interface/uci.rs:22:13 | 22 | "debug" => { | ^------ | | | _____________help: try merging the arm patterns: `"debug" | "setoption"` | | 23 | | // Handle debug mode 24 | | }, | |_____________^ | = help: or try changing either arm body note: other arm here --> src/interface/uci.rs:29:13 | 29 | / "setoption" => { 30 | | // Handle engine options 31 | | }, | |_____________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms = note: `#[warn(clippy::match_same_arms)]` implied by `#[warn(clippy::pedantic)]`
temporary with significant `Drop` can be early dropped: src/interface/uci.rs#L5
warning: temporary with significant `Drop` can be early dropped --> src/interface/uci.rs:5:13 | 3 | fn run() { | __________- 4 | | let stdin = io::stdin(); 5 | | let mut lines = stdin.lock().lines().map(|line| line.unwrap()); | | ^^^^^ ... | 65 | | } 66 | | } | |_- temporary `lines` is currently being dropped at the end of its contained scope | = note: this might lead to unnecessary resource contention = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#significant_drop_tightening = note: `#[warn(clippy::significant_drop_tightening)]` implied by `#[warn(clippy::nursery)]` help: merge the temporary construction with its single usage | 5 ~ 6 + let input = stdin.lock().lines().map(|line| line.unwrap()).unwrap(); | help: remove separated single usage | 8 - let input = lines.next().unwrap(); 8 + |
this function has too many arguments (13/7): src/chess/position.rs#L778
warning: this function has too many arguments (13/7) --> src/chess/position.rs:778:1 | 778 | / fn generate_pawn_moves( 779 | | pawns: Bitboard, 780 | | us: Player, 781 | | they: Player, ... | 791 | | moves: &mut MoveList, 792 | | ) { | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments note: the lint level is defined here --> src/lib.rs:43:5 | 43 | clippy::complexity, | ^^^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::too_many_arguments)]` implied by `#[warn(clippy::complexity)]`
docs for function which may panic missing `# Panics` section: src/chess/position.rs#L417
warning: docs for function which may panic missing `# Panics` section --> src/chess/position.rs:417:5 | 417 | pub fn make_move(&mut self, next_move: &Move) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first possible panic found here --> src/chess/position.rs:479:38 | 479 | let single_push_square = next_move.from.shift(us.push_direction()).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
this could be rewritten as `let...else`: src/chess/position.rs#L153
warning: this could be rewritten as `let...else` --> src/chess/position.rs:153:9 | 153 | / let pieces_placement = match parts.next() { 154 | | Some(placement) => placement, 155 | | None => bail!("incorrect FEN: missing pieces placement"), 156 | | }; | |__________^ help: consider writing: `let Some(pieces_placement) = parts.next() else { bail!("incorrect FEN: missing pieces placement") };` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
this function has too many lines (107/100): src/chess/position.rs#L149
warning: this function has too many lines (107/100) --> src/chess/position.rs:149:5 | 149 | / pub fn from_fen(input: &str) -> anyhow::Result<Self> { 150 | | let mut parts = input.split(' '); 151 | | // Parse Piece Placement. 152 | | let mut result = Self::empty(); ... | 260 | | } 261 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines = note: `#[warn(clippy::too_many_lines)]` implied by `#[warn(clippy::pedantic)]`
docs for function returning `Result` missing `# Errors` section: src/chess/position.rs#L149
warning: docs for function returning `Result` missing `# Errors` section --> src/chess/position.rs:149:5 | 149 | pub fn from_fen(input: &str) -> anyhow::Result<Self> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc = note: `#[warn(clippy::missing_errors_doc)]` implied by `#[warn(clippy::pedantic)]`
this could be a `const fn`: src/chess/position.rs#L102
warning: this could be a `const fn` --> src/chess/position.rs:102:5 | 102 | / pub(super) fn they(&self) -> Player { 103 | | self.us().opponent() 104 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
you are deriving `PartialEq` and can implement `Eq`: src/chess/core.rs#L634
warning: you are deriving `PartialEq` and can implement `Eq` --> src/chess/core.rs:634:30 | 634 | #[derive(Clone, Copy, Debug, PartialEq, PartialOrd)] | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
you are deriving `PartialEq` and can implement `Eq`: src/chess/core.rs#L385
warning: you are deriving `PartialEq` and can implement `Eq` --> src/chess/core.rs:385:30 | 385 | #[derive(Clone, Copy, Debug, PartialEq, PartialOrd)] | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq = note: `#[warn(clippy::derive_partial_eq_without_eq)]` implied by `#[warn(clippy::nursery)]`
this could be rewritten as `let...else`: src/chess/core.rs#L189
warning: this could be rewritten as `let...else` --> src/chess/core.rs:189:9 | 189 | / let (file, rank) = match square.chars().collect_tuple() { 190 | | Some((file, rank)) => (file, rank), 191 | | None => bail!( 192 | | "square should be two-char, got {square} with {} chars", 193 | | square.bytes().len() 194 | | ), 195 | | }; | |__________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else = note: `#[warn(clippy::manual_let_else)]` implied by `#[warn(clippy::pedantic)]` help: consider writing | 189 ~ let Some((file, rank)) = square.chars().collect_tuple() else { bail!( 190 + "square should be two-char, got {square} with {} chars", 191 + square.bytes().len() 192 + ) }; |
casting `u8` to `i8` may wrap around the value: src/chess/core.rs#L177
warning: casting `u8` to `i8` may wrap around the value --> src/chess/core.rs:177:31 | 177 | const MAX_INDEX: i8 = BOARD_SIZE as i8 - 1; | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
use Option::map_or instead of an if let/else: src/chess/core.rs#L140
warning: use Option::map_or instead of an if let/else --> src/chess/core.rs:140:9 | 140 | / match Self::try_from(self as i8 + shift) { 141 | | Ok(square) => Some(square), 142 | | Err(_) => None, 143 | | } | |_________^ help: try: `Self::try_from(self as i8 + shift).map_or(None, |square| Some(square))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else = note: `#[warn(clippy::option_if_let_else)]` implied by `#[warn(clippy::nursery)]`
casting `u8` to `i8` may wrap around the value: src/chess/core.rs#L137
warning: casting `u8` to `i8` may wrap around the value --> src/chess/core.rs:137:33 | 137 | Direction::Down => -(BOARD_WIDTH as i8), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
casting `u8` to `i8` may wrap around the value: src/chess/core.rs#L136
warning: casting `u8` to `i8` may wrap around the value --> src/chess/core.rs:136:30 | 136 | Direction::Up => BOARD_WIDTH as i8, | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap = note: `#[warn(clippy::cast_possible_wrap)]` implied by `#[warn(clippy::pedantic)]`
variables can be used directly in the `format!` string: src/chess/bitboard.rs#L523
warning: variables can be used directly in the `format!` string --> src/chess/bitboard.rs:523:17 | 523 | write!(f, "{}", LINE_SEPARATOR)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 523 - write!(f, "{}", LINE_SEPARATOR)?; 523 + write!(f, "{LINE_SEPARATOR}")?; |
variables can be used directly in the `format!` string: src/chess/bitboard.rs#L519
warning: variables can be used directly in the `format!` string --> src/chess/bitboard.rs:519:21 | 519 | write!(f, "{}", SQUARE_SEPARATOR)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 519 - write!(f, "{}", SQUARE_SEPARATOR)?; 519 + write!(f, "{SQUARE_SEPARATOR}")?; |
variables can be used directly in the `format!` string: src/chess/bitboard.rs#L489
warning: variables can be used directly in the `format!` string --> src/chess/bitboard.rs:489:21 | 489 | write!(f, "{}", piece)?; | ^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]` help: change this to | 489 - write!(f, "{}", piece)?; 489 + write!(f, "{piece}")?; |
this could be a `const fn`: src/chess/bitboard.rs#L447
warning: this could be a `const fn` --> src/chess/bitboard.rs:447:5 | 447 | / pub(super) fn player_pieces(&self, player: Player) -> &Pieces { 448 | | match player { 449 | | Player::White => &self.white_pieces, 450 | | Player::Black => &self.black_pieces, 451 | | } 452 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
this could be a `const fn`: src/chess/bitboard.rs#L439
warning: this could be a `const fn` --> src/chess/bitboard.rs:439:5 | 439 | / pub(super) fn empty() -> Self { 440 | | Self { 441 | | white_pieces: Pieces::empty(), 442 | | black_pieces: Pieces::empty(), 443 | | } 444 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
casting `u32` to `u8` may truncate the value: src/chess/bitboard.rs#L296
warning: casting `u32` to `u8` may truncate the value --> src/chess/bitboard.rs:296:36 | 296 | Ok(unsafe { mem::transmute(self.bits.trailing_zeros() as u8) }) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation help: ... or use `try_from` and handle the error accordingly | 296 | Ok(unsafe { mem::transmute(u8::try_from(self.bits.trailing_zeros())) }) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
casting `u32` to `u8` may truncate the value: src/chess/bitboard.rs#L276
warning: casting `u32` to `u8` may truncate the value --> src/chess/bitboard.rs:276:38 | 276 | Some(unsafe { mem::transmute(next_index as u8) }) | ^^^^^^^^^^^^^^^^ | = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation help: ... or use `try_from` and handle the error accordingly | 276 | Some(unsafe { mem::transmute(u8::try_from(next_index)) }) | ~~~~~~~~~~~~~~~~~~~~~~~~
consider adding a `;` to the last statement for consistent formatting: src/chess/bitboard.rs#L208
warning: consider adding a `;` to the last statement for consistent formatting --> src/chess/bitboard.rs:208:9 | 208 | self.bitand_assign(!rhs) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.bitand_assign(!rhs);` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
consider adding a `;` to the last statement for consistent formatting: src/chess/bitboard.rs#L183
warning: consider adding a `;` to the last statement for consistent formatting --> src/chess/bitboard.rs:183:9 | 183 | self.bits.bitand_assign(rhs.bits) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.bits.bitand_assign(rhs.bits);` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned = note: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(clippy::pedantic)]`
this could be a `const fn`: src/chess/bitboard.rs#L127
warning: this could be a `const fn` --> src/chess/bitboard.rs:127:5 | 127 | / pub(super) fn iter(self) -> BitboardIterator { 128 | | BitboardIterator { bits: self.bits } 129 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
this could be a `const fn`: src/chess/bitboard.rs#L108
warning: this could be a `const fn` --> src/chess/bitboard.rs:108:5 | 108 | / pub(super) fn is_empty(self) -> bool { 109 | | self.bits == 0 110 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
this could be a `const fn`: src/chess/bitboard.rs#L103
warning: this could be a `const fn` --> src/chess/bitboard.rs:103:5 | 103 | / pub(super) fn count(self) -> u32 { 104 | | self.bits.count_ones() 105 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
casting `u32` to `u8` may truncate the value: src/chess/bitboard.rs#L99
warning: casting `u32` to `u8` may truncate the value --> src/chess/bitboard.rs:99:33 | 99 | unsafe { mem::transmute(self.bits.trailing_zeros() as u8) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation help: ... or use `try_from` and handle the error accordingly | 99 | unsafe { mem::transmute(u8::try_from(self.bits.trailing_zeros())) } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers: src/chess/attacks.rs#L25
warning: casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers --> src/chess/attacks.rs:25:11 | 25 | + pext(occupancy.bits(), BISHOP_RELEVANT_OCCUPANCIES[from as usize]) as usize] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation help: ... or use `try_from` and handle the error accordingly | 25 | + usize::try_from(pext(occupancy.bits(), BISHOP_RELEVANT_OCCUPANCIES[from as usize]))] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers: src/chess/attacks.rs#L20
warning: casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers --> src/chess/attacks.rs:20:11 | 20 | + pext(occupancy.bits(), ROOK_RELEVANT_OCCUPANCIES[from as usize]) as usize] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation note: the lint level is defined here --> src/lib.rs:40:5 | 40 | clippy::pedantic, | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::cast_possible_truncation)]` implied by `#[warn(clippy::pedantic)]` help: ... or use `try_from` and handle the error accordingly | 20 | + usize::try_from(pext(occupancy.bits(), ROOK_RELEVANT_OCCUPANCIES[from as usize]))] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this function may allocate 820364 bytes on the stack: src/chess/attacks.rs#L18
warning: this function may allocate 820364 bytes on the stack --> src/chess/attacks.rs:18:15 | 18 | pub(super) fn rook_attacks(from: Square, occupancy: Bitboard) -> Bitboard { | ^^^^^^^^^^^^ 19 | ROOK_ATTACKS[ROOK_ATTACK_OFFSETS[from as usize] | ------------ `ROOK_ATTACKS` is the largest part, at 819200 bytes for type `[chess::bitboard::Bitboard; 102400]` | = note: 820364 bytes is larger than Clippy's configured `stack-size-threshold` of 512000 = note: allocating large amounts of stack space can overflow the stack and cause the program to abort = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_stack_frames = note: `#[warn(clippy::large_stack_frames)]` implied by `#[warn(clippy::nursery)]`
this could be a `const fn`: src/chess/attacks.rs#L10
warning: this could be a `const fn` --> src/chess/attacks.rs:10:1 | 10 | / pub(super) fn king_attacks(from: Square) -> Bitboard { 11 | | KING_ATTACKS[from as usize] 12 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn note: the lint level is defined here --> src/lib.rs:42:5 | 42 | clippy::nursery, | ^^^^^^^^^^^^^^^ = note: `#[warn(clippy::missing_const_for_fn)]` implied by `#[warn(clippy::nursery)]`
function `run` is never used: src/interface/uci.rs#L3
warning: function `run` is never used --> src/interface/uci.rs:3:4 | 3 | fn run() { | ^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `move_str`: src/interface/uci.rs#L45
warning: unused variable: `move_str` --> src/interface/uci.rs:45:29 | 45 | let move_str = tokens[i]; | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_move_str` | = note: `#[warn(unused_variables)]` on by default
Test Coverage
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1, actions-rs/install@v0.1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Test Coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/install@v0.1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test Coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test Coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test Coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test Coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/