Skip to content

Commit

Permalink
Fix warnings in c01-03
Browse files Browse the repository at this point in the history
  • Loading branch information
iolivia committed Dec 16, 2024
1 parent 43aad9c commit a9e85fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/rust-sokoban-c01-03/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ use hecs::{Entity, World};
use std::path;

// ANCHOR: components
#[allow(dead_code)]
pub struct Position {
x: u8,
y: u8,
z: u8,
}

#[allow(dead_code)]
pub struct Renderable {
path: String,
}
Expand All @@ -32,6 +34,7 @@ pub struct BoxSpot {}
// This struct will hold all our game state
// For now there is nothing to be held, but we'll add
// things shortly.
#[allow(dead_code)]
struct Game {
world: World,
}
Expand Down Expand Up @@ -101,7 +104,7 @@ pub fn create_player(world: &mut World, position: Position) -> Entity {

// ANCHOR: main
pub fn main() -> GameResult {
let mut world = World::new();
let world = World::new();

// Create a game context and event loop
let context_builder = ggez::ContextBuilder::new("rust_sokoban", "sokoban")
Expand Down

0 comments on commit a9e85fe

Please sign in to comment.