Apply strict linting to release builds #75

Merged
savanni merged 21 commits from clippy-linting into main 2023-10-05 17:01:49 +00:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 7711f68993 - Show all commits

View File

@ -83,7 +83,6 @@ mod test {
let db = let db =
Database::open_path(PathBuf::from("fixtures/five_games/")).expect("database to open"); Database::open_path(PathBuf::from("fixtures/five_games/")).expect("database to open");
assert_eq!(db.all_games().count(), 5); assert_eq!(db.all_games().count(), 5);
for game in db.all_games() {}
assert_matches!(db.all_games().find(|g| g.info.black_player == Some("Steve".to_owned())), assert_matches!(db.all_games().find(|g| g.info.black_player == Some("Steve".to_owned())),
Some(game) => { Some(game) => {

View File

@ -185,7 +185,7 @@ mod test {
#[test] #[test]
fn current_player_changes_after_move() { fn current_player_changes_after_move() {
let mut state = GameState::new(); let mut state = GameState::default();
assert_eq!(state.current_player, Color::Black); assert_eq!(state.current_player, Color::Black);
state.place_stone(Coordinate { column: 9, row: 9 }).unwrap(); state.place_stone(Coordinate { column: 9, row: 9 }).unwrap();
assert_eq!(state.current_player, Color::White); assert_eq!(state.current_player, Color::White);
@ -193,7 +193,7 @@ mod test {
#[test] #[test]
fn current_player_remains_the_same_after_self_capture() { fn current_player_remains_the_same_after_self_capture() {
let mut state = GameState::new(); let mut state = GameState::default();
state.board = Board::from_coordinates( state.board = Board::from_coordinates(
vec![ vec![
(Coordinate { column: 17, row: 0 }, Color::White), (Coordinate { column: 17, row: 0 }, Color::White),
@ -214,7 +214,7 @@ mod test {
#[test] #[test]
fn ko_rules_are_enforced() { fn ko_rules_are_enforced() {
let mut state = GameState::new(); let mut state = GameState::default();
state.board = Board::from_coordinates( state.board = Board::from_coordinates(
vec![ vec![
(Coordinate { column: 7, row: 9 }, Color::White), (Coordinate { column: 7, row: 9 }, Color::White),