_ makes the thing not yell at me

This commit is contained in:
LinlyBoi
2023-05-04 22:52:19 +03:00
parent b16b95a5c7
commit 9f6f97cc70

View File

@@ -104,12 +104,12 @@ pub fn get_legal_moves(
(row, col): &(usize, usize), (row, col): &(usize, usize),
(nrow, ncol): (usize, usize), (nrow, ncol): (usize, usize),
) -> Vec<Direction> { ) -> Vec<Direction> {
let max_col = nrow - 1; let _max_col = nrow - 1;
let max_row = ncol - 1; let _max_row = ncol - 1;
let mut moves: Vec<Direction> = vec![]; let mut moves: Vec<Direction> = vec![];
match *col { match *col {
0 => moves.push(Direction::UP), 0 => moves.push(Direction::UP),
max_row => moves.push(Direction::DOWN), _max_row => moves.push(Direction::DOWN),
_ => { _ => {
moves.push(Direction::UP); moves.push(Direction::UP);
moves.push(Direction::DOWN); moves.push(Direction::DOWN);
@@ -117,7 +117,7 @@ pub fn get_legal_moves(
}; };
match *row { match *row {
0 => moves.push(Direction::RIGHT), 0 => moves.push(Direction::RIGHT),
max_row => moves.push(Direction::LEFT), _max_row => moves.push(Direction::LEFT),
_ => { _ => {
moves.push(Direction::LEFT); moves.push(Direction::LEFT);
moves.push(Direction::RIGHT) moves.push(Direction::RIGHT)