Skip to content

Commit

Permalink
Fix things so I can compile on newer rust versions
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyja committed Aug 12, 2023
1 parent 3fa8a6a commit 0572745
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"

members = [
"battlesnake-rs",
Expand All @@ -21,7 +22,11 @@ rust-toolchain-version = "1.67.1"
# CI backends to support (see 'cargo dist generate-ci')
ci = ["github"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc"]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
]

# The profile that 'cargo dist' will build with
[profile.dist]
Expand Down
2 changes: 0 additions & 2 deletions battlesnake-rs/src/devious_devin_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use crate::a_prime::{APrimeCalculable, ClosestFoodCalculable};
use crate::*;
use battlesnake_minimax::paranoid::MinimaxSnake;

use battlesnake_game_types::types::*;

pub struct Factory;

#[derive(Serialize, PartialEq, PartialOrd, Ord, Eq, Debug, Copy, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion battlesnake-rs/src/famished_frank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ where
let targets = if you_body.len() < target_length as usize {
self.game.get_all_food_as_native_positions()
} else {
vec![
[
Position { x: 0, y: 0 },
Position {
x: (self.game.get_width() - 1) as i32,
Expand Down
1 change: 0 additions & 1 deletion battlesnake-rs/src/hovering_hobbs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::flood_fill::spread_from_head::{Scores, SpreadFromHead};
use crate::flood_fill::spread_from_head_arcade_maze::SpreadFromHeadArcadeMaze;
use crate::*;

use battlesnake_game_types::types::*;
use battlesnake_minimax::{
paranoid::{move_ordering::MoveOrdering, SnakeOptions},
ParanoidMinimaxSnake,
Expand Down
2 changes: 1 addition & 1 deletion battlesnake-rs/src/jump_flooding_snake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::*;

use battlesnake_minimax::paranoid::MinimaxSnake;

use battlesnake_game_types::{compact_representation::WrappedCellBoard4Snakes11x11, types::*};
use battlesnake_game_types::compact_representation::WrappedCellBoard4Snakes11x11;

use decorum::N64;

Expand Down
5 changes: 1 addition & 4 deletions battlesnake-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ impl Default for AboutMe {
}
}

use battlesnake_game_types::{
types::{Move, PositionGettableGame, SnakeIDGettableGame, YouDeterminableGame},
wire_representation::Position,
};
use battlesnake_game_types::wire_representation::Position;

// use crate::{
// bombastic_bob::BombasticBobFactory, constant_carter::ConstantCarterFactory,
Expand Down
2 changes: 1 addition & 1 deletion web-axum/src/hobbs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ pub(crate) async fn route_hobbs_move(
{
let mut state = state.lock();

let mut game_state = state
let game_state = state
.game_states
.get_mut(&game_id)
.expect("If we hit the start endpoint we should have a game state already");
Expand Down

0 comments on commit 0572745

Please sign in to comment.