cargo fmt

This commit is contained in:
Imbris 2024-01-04 00:30:21 -05:00
parent 6d57169875
commit 807bd758b7
12 changed files with 20 additions and 36 deletions

View File

@ -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<Vec<Event>, Error> {
pub fn tick(&mut self, inputs: ControllerInputs, dt: Duration) -> Result<Vec<Event>, 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

View File

@ -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> {

View File

@ -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::*;

View File

@ -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)]

View File

@ -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::{

View File

@ -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)]

View File

@ -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)]

View File

@ -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::*;

View File

@ -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::*;

View File

@ -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)]

View File

@ -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;

View File

@ -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