Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Aug 7, 2023
1 parent 2239779 commit 67f471c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
5 changes: 2 additions & 3 deletions egregoria/src/map/objects/parking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,10 @@ impl ParkingSpots {
}
}

let k = spots.insert(ParkingSpot {
spots.insert(ParkingSpot {
parent,
trans: Transform::new_dir(pos, dir),
});
k
})
})
.collect();

Expand Down
11 changes: 1 addition & 10 deletions egregoria/src/map/terrain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub const CHUNK_SIZE: u32 = 1024;
pub const CHUNK_RESOLUTION: usize = 32;
pub const CELL_SIZE: f32 = CHUNK_SIZE as f32 / CHUNK_RESOLUTION as f32;

#[derive(Clone)]
#[derive(Default, Clone)]
pub struct Chunk {
pub trees: Vec<Tree>,
pub heights: [[f32; CHUNK_RESOLUTION]; CHUNK_RESOLUTION],
Expand All @@ -26,15 +26,6 @@ impl Chunk {
}
}

impl Default for Chunk {
fn default() -> Self {
Self {
trees: Default::default(),
heights: Default::default(),
}
}
}

#[derive(Copy, Clone, Serialize, Deserialize)]
pub struct Tree {
pub pos: Vec2,
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/rendering/map_rendering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl MapRenderer {
defer!(log::info!("finished init of road render"));
MapRenderer {
meshb: MapMeshHandler::new(gfx, goria),
tree_builder: InstancedMeshBuilder::new(mesh.clone()),
tree_builder: InstancedMeshBuilder::new(mesh),
trees_cache: FastMap::default(),
tree_sub: goria.map().subscribe(UpdateType::Terrain),
terrain,
Expand Down

0 comments on commit 67f471c

Please sign in to comment.