diff --git a/common/src/astar.rs b/common/src/astar.rs index 68e6860665..60d5d27ed6 100644 --- a/common/src/astar.rs +++ b/common/src/astar.rs @@ -112,7 +112,7 @@ impl Astar { }) .collect(), visited_nodes: { - let mut s = HashMap::with_capacity_and_hasher(1, hasher.clone()); + let mut s = HashMap::with_capacity_and_hasher(1, hasher); s.extend(core::iter::once((start.clone(), NodeEntry { came_from: start, cheapest_score: 0.0, diff --git a/server/src/lib.rs b/server/src/lib.rs index 0e89162c44..786ed2b928 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -83,6 +83,7 @@ use common::{ terrain::{TerrainChunk, TerrainChunkSize}, vol::RectRasterableVol, }; +use common_base::prof_span; use common_ecs::run_now; use common_net::{ msg::{ClientType, DisconnectReason, ServerGeneral, ServerInfo, ServerMsg}, @@ -90,7 +91,6 @@ use common_net::{ }; use common_state::{BlockDiff, BuildAreas, State}; use common_systems::add_local_systems; -use common_base::prof_span; use metrics::{EcsSystemMetrics, PhysicsMetrics, TickMetrics}; use network::{ListenAddr, Network, Pid}; use persistence::{ @@ -455,9 +455,7 @@ impl Server { // Insert the world into the ECS (todo: Maybe not an Arc?) let world = Arc::new(world); state.ecs_mut().insert(Arc::clone(&world)); - state - .ecs_mut() - .insert(lod); + state.ecs_mut().insert(lod); state.ecs_mut().insert(index.clone()); // Set starting time for the server. diff --git a/world/src/civ/mod.rs b/world/src/civ/mod.rs index c223622e4b..87108a487d 100644 --- a/world/src/civ/mod.rs +++ b/world/src/civ/mod.rs @@ -1169,12 +1169,9 @@ impl Civs { // Find a route using existing paths // // If the novel path isn't efficient compared to this, don't use it - let max_novel_cost = { - let max_novel_cost = self - .route_between(site, nearby) - .map_or(f32::MAX, |(_, route_cost)| route_cost / 3.0); - max_novel_cost - }; + let max_novel_cost = self + .route_between(site, nearby) + .map_or(f32::MAX, |(_, route_cost)| route_cost / 3.0); let start = loc; let end = self.sites.get(nearby).center; @@ -1215,7 +1212,6 @@ impl Civs { ctx.sim.get_mut(locs[1]).unwrap().path.0.neighbors |= 1 << (i as u8); randomize_offset = true; } else if !self.bridges.contains_key(&locs[1]) { - //dbg!("here"); called 18 times let center = (locs[1] + locs[2]) / 2; let id = establish_site(self, &mut ctx.reseed(), center, move |place| {