Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-orr committed Jan 7, 2023
1 parent 58b912c commit 1f82c5f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/game/board/tile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ impl Tile {
TileType::Farm => 4,
TileType::City => 6,
};
let road_cost = if self.contents == TileContents::Road {
1
} else {
0
};
let road_cost = usize::from(self.contents == TileContents::Road);
type_cost + road_cost
}

Expand Down

0 comments on commit 1f82c5f

Please sign in to comment.