From 807bd758b76c8ed7625eec9d1809d9b6b5916022 Mon Sep 17 00:00:00 2001 From: Imbris Date: Thu, 4 Jan 2024 00:30:21 -0500 Subject: [PATCH] cargo fmt --- client/src/lib.rs | 11 +++++------ common/systems/src/aura.rs | 4 +--- common/systems/src/beam.rs | 3 +-- common/systems/src/buff.rs | 4 ++-- common/systems/src/character_behavior.rs | 3 +-- common/systems/src/controller.rs | 5 +---- common/systems/src/interpolation.rs | 4 ++-- common/systems/src/phys.rs | 5 ++--- common/systems/src/projectile.rs | 4 ++-- common/systems/src/shockwave.rs | 5 +---- common/systems/src/stats.rs | 3 +-- server/agent/src/data.rs | 5 +---- 12 files changed, 20 insertions(+), 36 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 1b54436185..6977133a8f 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -410,7 +410,10 @@ impl Client { // Initialize `State` let pools = State::pools(GameMode::Client); - let mut state = State::client(pools, map_size_lg, world_map.default_chunk, + let mut state = State::client( + pools, + map_size_lg, + world_map.default_chunk, // TODO: Add frontend systems |dispatch_builder| { add_local_systems(dispatch_builder); @@ -1803,11 +1806,7 @@ impl Client { /// Execute a single client tick, handle input and update the game state by /// the given duration. - pub fn tick( - &mut self, - inputs: ControllerInputs, - dt: Duration, - ) -> Result, Error> { + pub fn tick(&mut self, inputs: ControllerInputs, dt: Duration) -> Result, Error> { span!(_guard, "tick", "Client::tick"); // This tick function is the centre of the Veloren universe. Most client-side // things are managed from here, and as such it's important that it diff --git a/common/systems/src/aura.rs b/common/systems/src/aura.rs index e481a2e4dd..037b42d84c 100644 --- a/common/systems/src/aura.rs +++ b/common/systems/src/aura.rs @@ -11,9 +11,7 @@ use common::{ uid::{IdMaps, Uid}, }; use common_ecs::{Job, Origin, Phase, System}; -use specs::{ - shred, Entities, Entity as EcsEntity, Join, Read, ReadStorage, SystemData, -}; +use specs::{shred, Entities, Entity as EcsEntity, Join, Read, ReadStorage, SystemData}; #[derive(SystemData)] pub struct ReadData<'a> { diff --git a/common/systems/src/beam.rs b/common/systems/src/beam.rs index 3d7f869229..d22bae4bc6 100644 --- a/common/systems/src/beam.rs +++ b/common/systems/src/beam.rs @@ -17,8 +17,7 @@ use common_ecs::{Job, Origin, ParMode, Phase, System}; use rand::Rng; use rayon::iter::ParallelIterator; use specs::{ - shred, Entities, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, - SystemData, WriteStorage, + shred, Entities, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, WriteStorage, }; use vek::*; diff --git a/common/systems/src/buff.rs b/common/systems/src/buff.rs index 933b17e9f6..fe463d371f 100644 --- a/common/systems/src/buff.rs +++ b/common/systems/src/buff.rs @@ -22,8 +22,8 @@ use common_base::prof_span; use common_ecs::{Job, Origin, ParMode, Phase, System}; use rayon::iter::ParallelIterator; use specs::{ - shred, Entities, Entity, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, - SystemData, WriteStorage, + shred, Entities, Entity, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, + WriteStorage, }; #[derive(SystemData)] diff --git a/common/systems/src/character_behavior.rs b/common/systems/src/character_behavior.rs index a4a78780b5..37b09aca26 100644 --- a/common/systems/src/character_behavior.rs +++ b/common/systems/src/character_behavior.rs @@ -1,6 +1,5 @@ use specs::{ - shred, Entities, LazyUpdate, LendJoin, Read, ReadExpect, ReadStorage, - SystemData, WriteStorage, + shred, Entities, LazyUpdate, LendJoin, Read, ReadExpect, ReadStorage, SystemData, WriteStorage, }; use common::{ diff --git a/common/systems/src/controller.rs b/common/systems/src/controller.rs index 790c7e61a2..9b6dec9ab2 100644 --- a/common/systems/src/controller.rs +++ b/common/systems/src/controller.rs @@ -9,10 +9,7 @@ use common::{ uid::IdMaps, }; use common_ecs::{Job, Origin, Phase, System}; -use specs::{ - shred, Entities, Join, Read, ReadExpect, ReadStorage, SystemData, - WriteStorage, -}; +use specs::{shred, Entities, Join, Read, ReadExpect, ReadStorage, SystemData, WriteStorage}; use vek::*; #[derive(SystemData)] diff --git a/common/systems/src/interpolation.rs b/common/systems/src/interpolation.rs index 9bb75b00ad..c79bc3782a 100644 --- a/common/systems/src/interpolation.rs +++ b/common/systems/src/interpolation.rs @@ -6,8 +6,8 @@ use common_base::prof_span; use common_ecs::{Job, Origin, Phase, System}; use common_net::sync::InterpolatableComponent; use specs::{ - prelude::ParallelIterator, shred, Entities, ParJoin, Read, ReadStorage, - SystemData, WriteStorage, + prelude::ParallelIterator, shred, Entities, ParJoin, Read, ReadStorage, SystemData, + WriteStorage, }; #[derive(SystemData)] diff --git a/common/systems/src/phys.rs b/common/systems/src/phys.rs index 364d948f24..c9783905ba 100644 --- a/common/systems/src/phys.rs +++ b/common/systems/src/phys.rs @@ -22,9 +22,8 @@ use common_base::{prof_span, span}; use common_ecs::{Job, Origin, ParMode, Phase, PhysicsMetrics, System}; use rayon::iter::ParallelIterator; use specs::{ - shred, - Entities, Entity, Join, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, Write, - WriteExpect, WriteStorage, + shred, Entities, Entity, Join, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, + Write, WriteExpect, WriteStorage, }; use std::ops::Range; use vek::*; diff --git a/common/systems/src/projectile.rs b/common/systems/src/projectile.rs index 464230e309..814bd21f10 100644 --- a/common/systems/src/projectile.rs +++ b/common/systems/src/projectile.rs @@ -17,8 +17,8 @@ use common::vol::ReadVol; use common_ecs::{Job, Origin, Phase, System}; use rand::Rng; use specs::{ - shred, Entities, Entity as EcsEntity, Join, Read, ReadExpect, ReadStorage, - SystemData, WriteStorage, + shred, Entities, Entity as EcsEntity, Join, Read, ReadExpect, ReadStorage, SystemData, + WriteStorage, }; use std::time::Duration; use vek::*; diff --git a/common/systems/src/shockwave.rs b/common/systems/src/shockwave.rs index d74b3fe5a2..fa4fb4dd65 100644 --- a/common/systems/src/shockwave.rs +++ b/common/systems/src/shockwave.rs @@ -15,10 +15,7 @@ use common::{ }; use common_ecs::{Job, Origin, Phase, System}; use rand::Rng; -use specs::{ - shred, Entities, Join, LendJoin, Read, ReadStorage, SystemData, - WriteStorage, -}; +use specs::{shred, Entities, Join, LendJoin, Read, ReadStorage, SystemData, WriteStorage}; use vek::*; #[derive(SystemData)] diff --git a/common/systems/src/stats.rs b/common/systems/src/stats.rs index ffa01bf89d..8dd19cf102 100644 --- a/common/systems/src/stats.rs +++ b/common/systems/src/stats.rs @@ -12,8 +12,7 @@ use common::{ }; use common_ecs::{Job, Origin, Phase, System}; use specs::{ - shred, Entities, LendJoin, Read, ReadExpect, ReadStorage, SystemData, - Write, WriteStorage, + shred, Entities, LendJoin, Read, ReadExpect, ReadStorage, SystemData, Write, WriteStorage, }; const ENERGY_REGEN_ACCEL: f32 = 1.0; diff --git a/server/agent/src/data.rs b/server/agent/src/data.rs index 8f4f0ed2d1..eea12e5053 100755 --- a/server/agent/src/data.rs +++ b/server/agent/src/data.rs @@ -26,10 +26,7 @@ use common::{ terrain::TerrainGrid, uid::{IdMaps, Uid}, }; -use specs::{ - shred, Entities, Entity as EcsEntity, Read, ReadExpect, ReadStorage, - SystemData, -}; +use specs::{shred, Entities, Entity as EcsEntity, Read, ReadExpect, ReadStorage, SystemData}; // TODO: Move rtsim back into AgentData after rtsim2 when it has a separate // crate